WASHINGTON – In a major rebuke to President Donald Trump on his signature domestic policy issue, the Republican-controlled Senate voted Thursday to block the national emergency the president declared to free up money for his border wall.

A dozen Republicans joined all Democrats backing a resolution to rescind Trump’s effort to tap into more than $6 billion that Congress set aside for other programs, most of them at the Pentagon.

Trump vowed to use his veto power for the first time to kill the resolution, which passed the House last month. There’s probably not enough opposition to override that veto, but the Senate vote was nevertheless a significant political setback for Trump.

The president, who had lobbied hard in recent days to keep Republicans in line, responded with a single-word tweet after the vote.

"VETO!" was all he wrote.

Senate Minority Leader Charles Schumer, D-N.Y., noted that the National Emergencies Act allows Democrats to bring the resolution back to the floor every six months, forcing Republicans to repeatedly revisit the tough vote – "and certainly we intend to do that."

"Let's hope these votes are green shoots," Schumer said, "that Republicans are learning that total embrace of President Trump is counterproductive and unsustainable."

Republican senators such as Utah’s Mitt Romney and Tennessee’s Lamar Alexander said they supported Trump’s desire to build the wall, but they did not want to set a precedent of a president going around Congress for funding lawmakers rejected.

Congress sent Trump $1.375 billion for the wall in February, far less than he wanted.

“This check on the executive is a crucial source of our freedom,” Alexander said.

In addition to the political symbolism, the vote – and the remarks from Trump's allies – are almost certain to wind up in several federal lawsuits challenging Trump's emergency declaration. Protect Democracy, one of the first groups to file a lawsuit against Trump, argued that the congressional action would strengthen its case.

"Even if the president vetoes the resolution, the message sent by Republicans and Democrats in Congress is that the president’s attempts to usurp power from the legislative branch will not go unchecked," said Stuart Gerson, co-counsel in the Protect Democracy case.

The litigation was one of the arguments GOP senators made as they pressed Trump to take another path to his wall.

“I know the president has the votes to pursue his approach,” Ohio Sen. Rob Portman said before the vote. “But I continue to hope the president uses the funds he has available to him without creating a bad precedent, having some of the needed funds tied up in the courts and taking money from important military projects.”

The White House has not said specifically which Pentagon projects would be cut to help build the wall. The emergency allows Trump to dip into defense and other funds that would otherwise be off-limits because Congress directed that money for other priorities.

The political implication of the Republican defections is enormous. The rebuke puts on display a wedge within the GOP that Democrats are certain to exploit heading into the 2020 election.

Trump aides hope to use the issue to fire up supporters. The president's campaign blasted an email Thursday arguing "we must FINISH THE WALL."

White House officials, including Vice President Mike Pence, scrambled behind the scenes to keep the number of Republican votes low. Trump signaled shortly before the vote that he could be open to limiting a president's power on future emergencies.

His last-minute efforts may have swayed Sen. Thom Tillis, R-N.C., who fell back in line after announcing in February that he would oppose the emergency.

Shortly before reversing positions and voting to keep the declaration in place, Tillis said the White House was working "in good faith" to amend the National Emergencies Act.

"I, for one, am going to work on that and hopefully gain consensus on a bipartisan basis after the temperatures have cooled," said Tillis, who faces re-election next year.

Here are the senators who broke with Trump:

Mitt Romney

Romney, the Republican presidential nominee in 2012, has had a complicated relationship with Trump, whom he publicly criticized during the 2016 election. Trump endorsed Romney's bid for Senate last year to fill the seat left open by Orrin Hatch's retirement.

"I agree that a physical barrier is urgently needed," Romney said. "I am seriously concerned that overreach by the executive branch is an invitation to further expansion and abuse by future presidents."

Lamar Alexander

Alexander urged Trump for weeks to find a way to access unspent money without taking the step of declaring an emergency. Though he appeared to be leaning against Trump on the issue, he did not announce his position until just before the vote.

"I support the president on border security," Alexander said. But, he said, the emergency "is inconsistent with the U.S. Constitution that I swore an oath to support."

Roy Blunt

Of the dozen Republican "yes" votes, six serve on the Senate Appropriations Committee, the panel tasked with deciding how taxpayer money is spent. Members on the committee, many of whom have a reputation for bipartisan deal making, arguably had the most to lose from relinquishing spending authority to the president.

Sen. Blunt, R-Mo., was among the appropriators who opposed Trump.

“I think it sets a dangerous precedent and I hope he doesn’t do it,” Blunt told reporters this year.

Rand Paul

Sen. Rand Paul, R-Ky., had voiced objections to the emergency declaration earlier this month. Paul said that approving the declaration would be tantamount to giving "extra-Constitutional powers to the president" – something he said he’s unwilling to do.

Mike Lee

Sen. Mike Lee, R-Utah, made a last-ditch effort to ease some GOP concerns about presidential emergencies. Lee's proposal would have terminated some presidential emergencies after 30 days unless Congress affirmatively voted to reauthorize them, a measure that might have given cover to some Republicans concerned about the precedent set by Trump's declaration.

But talks over that idea collapsed after the White House rejected it.

Rob Portman

Portman announced his position in a speech on the Senate floor on Thursday, arguing a future president could use another national emergency to tear down Trump's wall if it is built. Administration officials had lobbied hard for Portman's vote. The senator told reporters in late February that he attended a meeting with Pence and Justice Department officials to discuss the president's emergency.

"It doesn't mean the president can ignore Congress and substitute his will for the will of the people," Portman said.

Lisa Murkowski

Sen. Lisa Murkowski of Alaska was one of the relatively early opponents of the emergency declaration. Murkowski does not face re-election until 2022, giving her some cover to oppose a president who remains popular within the GOP.

"My concern is really about the institution of the Congress," Murkowski said recently. "The power of the purse rests with the Congress."

Susan Collins

Among the Senate's most outspoken centrist Republicans, Susan Collins of Maine was an early opponent of Trump's use of an emergency to free up funding for the wall. She was also not swayed by efforts made by some of her GOP colleagues, including Lee, to limit the president's future emergency powers.

That effort, she said, did "not address the current problem that we have, where the president, in my judgment, is usurping Congressional authority to appropriate funds.”

Jerry Moran

Sen. Jerry Moran, R-Kan., took the unusual step of announcing his decision to oppose Trump by tweeting a photograph of a handwritten statement, including with edit marks.

"The president can advance the building of a wall with the funding just approved by Congress," Moran wrote on a legal pad, referring to the recently passed legislation that reopened federal agencies after the historic 35-day government shutdown. "The declaration of an emergency is not necessary."

Marco Rubio

Sen. Marco Rubio, R-Fla., had expressed reservations about Trump's use of an emergency declaration as far back as last month. The onetime presidential candidate and Trump foe has been an on-again, off-again supporter of Trump's policies.

“We have a crisis at our southern border, but no crisis justifies violating the Constitution,” the state's senior senator said last month. "A future president may use this exact same tactic to impose the Green New Deal."

Pat Toomey

Sen. Pat Toomey, R-Pa., had voiced concern about Trump’s emergency declaration, but didn’t announce he would vote to block it until Thursday.

Toomey, who kept a careful distance from Trump when he ran for re-election in 2016, told Pennsylvania reporters that he supported the president’s underlying goal. But he said he also feared Trump’s declaration would pave the way for a future Democratic president issuing a national emergency to combat climate change.

Roger Wicker

Sen. Roger Wicker, R-Miss., was among more than a dozen Republican senators who tried to gain support for a bill that would limit presidential emergency declarations. Wicker, who was re-elected to a third term last year, had urged Trump not to declare an emergency, arguing the administration could have pulled money from elsewhere.

“I think there are reprogramming opportunities for him outside of [an] emergency,” said Wicker, known as a defender of Senate traditions.

Contributing: Ledyard King, Deborah Barfield Berry