A staggering 12 Senate Republicans have officially voted to block President Donald Trump’s declaration of national emergency, highlighting a marked split between GOP lawmakers and the White House on the president’s attempt to obtain more funding for his border wall.

Sens. Susan Collins, Lisa Murkowski, Rand Paul, Mitt Romney, Mike Lee, Lamar Alexander, Jerry Moran, Pat Toomey, Rob Portman, Roger Wicker, Roy Blunt, and Marco Rubio ultimately joined with Democrats to vote for a resolution terminating the president’s national emergency. As many as 10 Republicans were reportedly considering breaking with Trump on the subject, and even more wound up actually doing so, leading to a final 59-41 vote.

It’s the second time in as many days that Senate Republicans have directly confronted the president: On Wednesday, seven Republican senators voted in favor of a resolution to end US involvement in Saudi Arabia’s war in Yemen, a measure that Trump is also expected to veto.

Both chambers of Congress have now passed the national emergency resolution, which would end the emergency if the president decides to sign it. But Trump has said he won’t, and though a number of Republicans opposed the resolution, not enough did to get to a veto-proof threshold. It’s the first time in US history that Congress has voted to terminate a president’s national emergency, and Trump is very much set to shoot down the measure.

Trump’s anticipated vetoes on the national emergency resolution and the Yemen resolution would be the first of his presidency. The Senate’s votes on both highlight a Republican Party that’s suddenly more open to breaking with the Oval Office.

Republicans really, really haven’t wanted to confront the president in the past

Senate Republicans haven’t necessarily wanted to go up against Trump, especially on his signature campaign issue, but in this case, their concerns about constitutionality and precedent won out.

Trump had declared the national emergency in February in an effort to obtain money for a wall along the southern border and claim he won on the matter after Congress declined to allocate him the funds he requested. He did so after numerous Republicans had urged him not to, including Senate Majority Leader Mitch McConnell.

Republicans were worried that the move was of dubious constitutionality and that it could set a precedent for future Democratic presidents to use national emergencies as a tool to fund policy priorities like a Green New Deal. It wasn’t clear, however, whether these statements would translate to actual votes against the emergency.

For a sizable number of Republicans, it turns out they did.

The concern that this declaration could establish a precedent that future presidents might abuse is what spurred many Republicans to vote in favor of blocking the emergency, even as the president hammered them on Twitter and argued that the issue at hand was simply border security. Several Republicans also highlighted the president’s effort to bypass Congress’s constitutionally designated “power of the purse” and cited that as a reason for their votes.

Republican Senators are overthinking tomorrow’s vote on National Emergency. It is very simply Border Security/No Crime - Should not be thought of any other way. We have a MAJOR NATIONAL EMERGENCY at our Border and the People of our Country know it very well! — Donald J. Trump (@realDonaldTrump) March 13, 2019

“Such a declaration would undermine the role of Congress and the appropriations process; it’s just not good policy,” Sen. Susan Collins (R-ME) previously said in a statement. “It also sets a bad precedent for future Presidents — both Democratic and Republican — who might seek to use this same maneuver to circumvent Congress to advance their policy goals.”

As Trump has noted in his tweets, Republicans broadly agree with him on the matter of bolstering border security, but they disagree with his means of using the national emergency to obtain funding. He’s also hinted in statements that the Republicans who vote against the emergency could face a revolt from the base and attract potential primary challengers.

Given their longstanding reluctance to openly oppose the president, Republican senators were still looking for ways to avoid a high-profile conflict as recently as this week.

Sen. Mike Lee (R-UT) had proposed a bill that would amend the National Emergencies Act and limit future presidents’ power to use it, thereby somewhat addressing the “precedent” problem. In exchange for the White House’s support on the bill, a group of Republicans were open to voting against Thursday’s resolution. Trump, however, declined to back the trade.

Republicans were so keen to figure something out that a trio of senators stormed a dinner Trump was having on Wednesday, to see if there was still potential for compromise, the Washington Post’s Erica Werner, Seung Min Kim, and John Wagner reported. Trump, once again, demurred.

Left with few alternatives, Republican lawmakers eventually made their decision. It’s one of the only substantive times that so many have taken such action, writes the Washington Post’s Aaron Blake:

As Blake notes, even though the measure is due to get vetoed, the congressional passage of the resolution matters.

The congressional vote against the resolution could be used against Trump in court

The next stop for the fight against the national emergency will take place in courts across the country as organizations including the American Civil Liberties Union and more than 16 states pursue lawsuits challenging Trump’s declaration.

One of the arguments these suits are making is that Trump is attempting to obtain funds via the national emergency that Congress has already declined to give him, rendering his actions unconstitutional. Since Congress holds the power to authorize federal spending, as designated by the Constitution, Trump’s efforts could be seen as going around the legislative branch.

The congressional vote against the resolution could be used in court to demonstrate just how much opposition there is from the legislative branch to Trump’s actions, legal experts told Vox. It could also be used to show that the emergency Trump is claiming is anything but, since Congress has now actively sought to terminate it.

“When this issue gets to the courts, Congress’s view that no emergency exists might well affect how aggressively the courts review the president’s arguments to the contrary,” said Richard Pildes, a constitutional law professor at NYU.

The National Emergencies Act of 1976 gives presidents a wide berth when it comes to determining what an emergency is, which could provide Trump’s declaration the cover it needs to prevail in court.

Congress’s vote on Thursday, however, could definitely speak to questions about its constitutionality — if a judge ends up weighing this argument.