U.S. Sen. Marco Rubio voted Thursday to block President Donald Trump’s declaration of an emergency at the border, joining Democrats and 11 Republicans to deliver a blow to the White House’s power play.

In a rare rebuke of Trump by the GOP-controlled Senate, 59 members voted for the resolution, with 41, all Republicans, voting against it. The measure already passed the House last month, and will next go to Trump’s desk. The president has vowed to cast his first veto to kill it. The resolution failed to surpass a veto-proof majority in either chamber.

“We have an emergency at our border, which is why I support the president’s use of forfeiture funds and counter-drug money to build a wall," Rubio said in a statement. "However, I cannot support moving funds that Congress explicitly appropriated for construction and upgrades of our military bases. This would create a precedent a future president may abuse to jumpstart programs like the Green New Deal.”

Meanwhile, Sen. Rick Scott sided with Trump despite questions about the constitutionality of Trump’s actions.

“I support the President’s efforts to secure our border. It’s clear that there is a crisis and it’s long-passed time to fix it,” Scott tweeted earlier Thursday. “This isn’t a good process, but I’m more focused on results.”

Trump last month declared a national emergency at the southern border and said he plans to divert $8 billion from the Treasury and the Department of Defense to build a barrier and “the wall” between the United States and Mexico. Florida bases could lose up to $177 million if the declaration proceeds, which Rubio cited in his opposition.

If Trump proceeds, a legal challenge is likely. The White House’s budget this week calls for even more spending at the southern border, beyond what he requested in his emergency declaration.

Rubio criticized the declaration, concerned the action was “violating the Constitution," though he said he would reserve judgement “to see what statutory or constitutional power the President relies on to justify such a declaration.”

He kept that judgment quiet right up until the vote. Just before heading to the Senate floor he tweeted the latest update on the Venezuela situation and his office announced a new election security bill.

Rubio joins Rep. Francis Rooney, R-Naples, as the only Florida Republicans in Congress to vote for the resolution.