Just one day after House Democrats launched a formal impeachment inquiry, President Donald Trump was rebuked again — this time by members of his own party.

On Wednesday, Senate Democrats forced a vote on a resolution terminating the national emergency Trump first declared in February to obtain money for a border wall, and it picked up a decent showing of Republican support. It’s the second time Democrats have pushed a vote on this specific declaration, something they have the ability to do every six months, as laid out in the National Emergencies Act of 1976.

This time around, Democrats were joined by eleven Republicans, a decrease from the 12 Republicans who voted to terminate the emergency in March. While the resolution passed again with a vote of 54-41, it’s expected to get vetoed by Trump.

The last time Democrats tried to advance a similar resolution, the measure also passed, but was stymied by a veto as well. Republicans previously disagreed with the precedent the declaration would set for a president’s use of executive power, and broke with Trump to express their opposition.

Wednesday’s vote isn’t expected to stop the actual construction of more fencing; Trump began raiding military construction budgets in order to fund the wall earlier this month. But Democrats introduced the resolution at least in part to pressure Republicans — especially vulnerable senators in swing states — to make clear where they stood. And they weren’t able to avoid it: Because the 1976 law specifies that this resolution is “privileged,” a term that applies to measures the upper chamber must consider, Republicans were unable to prevent it from coming to the floor.

“The Trump administration has proposed pilfering funds from projects in 23 states, three US territories and military installations in 20 countries, including $80 million from projects in North Carolina,” Senate Minority Leader Chuck Schumer said in a floor speech a few weeks ago. “How do we say to the men and women who risked their lives for us ... that we’re taking their money away?”

The vote was aimed at putting vulnerable Republicans in a difficult position

The vote took place as the Trump administration actively raids $3.6 billion in funding for 127 projects across the country. Effectively, it pushed senators to choose between support for Trump and concerns they might have about the funds that are being siphoned from state budgets.

As Vox’s Alex Ward has reported, about half of all 50 states are set to be affected by the planned funding shifts. Projects including improvements to the West Point military academy and natural disaster recovery efforts in Puerto Rico are among those that are expected to lose money.

Such efforts have garnered pushback not only from Democrats, but Republicans as well. Sens. Mitt Romney and Mike Lee, both of Utah, said they were concerned with the decision to move state funding for the border wall. “Funding the border wall is an important priority, and the Executive Branch should use the appropriate channels in Congress, rather than divert already appropriated funding away from military construction projects and therefore undermining military readiness,” Romney said in a statement.

Senators in swing states like Colorado, Arizona, and North Carolina are the ones in the most precarious position with a vote like this. If they voted in favor of blocking the emergency, they risked Trump’s wrath and the threat of a potential primary challenger — something Sen. Thom Tillis (R-NC) already experienced when he initially opposed the president’s national emergency earlier this year. If they voted in favor of keeping the declaration, they’re condoning the use of state funds for the border wall.

Of the Republican Senators representing swing states, Sen. Susan Collins (R-ME) was the only one to vote in favor of blocking the national emergency on Wednesday.