Senate members of  President Trump’s own party stood up to him on Thursday, likely forcing him to use his veto power for the first time.

The vote was 59-41, with a dozen Republicans joining Democrats voting to block Trump’s Emergency Declaration to fund his border wall. Moments after the vote, Trump tweeted his intentions:

Trump is expected to veto both that vote and one Wednesday that would cut U.S. military involvement in Yemen’s brutal civil war.

The Associated Press reports that this is “the first time Congress has rejected a presidential emergency under the 1976 National Emergency Act.” 

“After more than two years of keeping his veto pen capped, Trump is going to have to put it to use — twice — courtesy of Republicans,” reports Politco. “In a remarkable bit of timing, the Senate will hold two votes this week placing GOP senators at odds with the president on foreign and domestic policy, likely forcing the first vetoes of his presidency.”

Republican senators who voted against the president today included Lamar Alexander (TN), Roy Blunt (MO), Susan Collins (ME), Mike Lee (UT), Jerry Moran (KS), Lisa Murkowski (AK), Rand Paul (KY), Rob Portman (OH), Mitt Romney (UT), Marco Rubio (FL), Patrick Toomey (PA) and Roger Wicker (MS). They joined all 47 Senate Democrats.

Trump was warned of the impending votes last night by three GOP senators — Ted Cruz of Texas, Lindsey Graham of South Carolina and Ben Sasse of Nebraska — who “unexpectedly arrived as Trump was having dinner in the [White House] residence with family,” reports the Washington Post.

In a tweet early Thursday, Trump said there will be “A big National Emergency vote today … on Border Security & the Wall (which is already under major construction.” He added, “I am prepared to veto, if necessary.” He called the U.S.-Mexico border “a National Security and Humanitarian Nightmare.”

Last month, after Congress balked on funding his border wall, Trump did an end-run by declaring the national emergency. That raised a major Constitutional issue: Congress’s power of the purse.

“I believe the use of emergency powers in this circumstance violates the Constitution,” said Senator Jerry Moran, Republican of Kansas, in a statement written on lined paper, reported the New York Times. Moran added that it would continue “our country down the path of all powerful executive — something those who wrote the Constitution were fearful of.”

“It’s ‘extraordinary’ to see Congress working to claw back power from the executive branch in a matter of days,” said Sen. Rand Paul (R-KY), who Politico says “will vote with Democrats and a handful of Republicans to form a bipartisan majority to try to handcuff Trump on both issues.”

“Congress should declare war and Congress should spend the money. I mean, those are two bedrock constitutional principles,” Paul said. “It has nothing to do with the president, it has to do with the Constitution.”

Last night’s unusual White House visit by the three senators, the Post said, was an “attempted last-minute intervention [that] underscores concerns of senators like Cruz who have voiced serious reservations about the constitutionality of Trump’s declaration but don’t want to cross him on a key vote on border security.”

Trump later tweeted that such a vote would be “a vote for Nancy Pelosi, Crime, and the Open Border Democrats!”

Not enough Republican senators appear willing to oppose the president to override a veto.

But, says the Post, the Senate vote will “still stand as an embarrassing rebuff of a key Trump initiative at the hands of his own party,” and coming a day after a Senate vote to end U.S. support for the Saudi-led war in Yemen, it represents rare “twin rebukes from a Senate that has mostly bowed to Trump’s wishes.”

Politico says some Trump allies believe a defeat in the Senate over the national emergency declaration “is unlikely to cause lasting political damage to the president.”

But, it says, “For Democrats who have seen no similar pushback from the GOP other than a handful of failed judicial nominations and the 2017 collapse of Obamacare repeal there was some hope of a broader shift.”

In a wry comment, Sen. Chris Murphy (D-CT) said that “Maybe Republicans did notice the 2018 election.” He added that scheduling the Emergency and Yemen votes so closely together suggests “Republicans want to peel two Band-Aids off at once.”