US President Donald Trump has suffered an embarrassing defeat at the hands of senators, including fellow Republicans, who voted to terminate his declaration of an emergency on the border with Mexico.

Mr Trump's response was swift and unequivocal: "VETO!" he tweeted after a dozen Republicans joined Democrats in voting down the emergency, declared as a way to secure alternative funding for the border wall denied to him by Congress.

Opponents had argued that Mr Trump's emergency amounted to executive overreach, saying a vote to curtail his authority would preserve the constitutionally mandated separation of powers in Washington.

Half a dozen Republicans had already spoken out publicly against the February declaration. But on the morning of the vote, the simmering revolt grew to 12 Republicans, and the final tally was a resounding 59 to 41.

Mr Trump had made clear he planned to use his veto powers to override any congressional block, after failing to strong-arm enough Republicans into line.

Unless there is a substantial weakening of support for Mr Trump among congressional Republicans on the issue, the first veto of his presidency is expected to stand.

The Senate and House of Representatives would each need a two-thirds majority to override a block by the White House, and both parties say the numbers are not likely there. 

"It won't be overturned and the legal scholars say it's totally constitutional," Mr Trump told reporters of his emergency.

Mr Trump argues the move allows him to skirt Congress and repurpose billions of dollars in other government funds, including money earmarked for military facilities.

But Democrats and some Republicans point to Congress's constitutional duty to control government purse strings - and say declaring an emergency to seize more money is an abuse of executive authority.

Senator Mitt Romney, the 2008 Republican presidential nominee, opposed Mr Trump on the declaration, saying he cast his vote "for the constitution and for the balance of power that is at its core".

A group of Republicans had sought to limit defections by cutting a deal with the president to rein in emergency declaration powers, but Mr Trump refused.

He set the stage for the showdown by using now-familiar pressure tactics, unsuccessfully warning Republicans not to rebuke him on the emergency.

"Don't vote with Pelosi!" he boomed on Twitter early today, referring to House Speaker Nancy Pelosi whose Democratic-led chamber had already approved the resolution.

Ms Pelosi, who lunched with Mr Trump and Taoiseach Leo Varadkar at the US Capitol two hours before the critical Senate vote, had urged the upper chamber to "reject the president's unconstitutional measure".