U.S. President Donald Trump issued the first veto of his presidency on Friday to block a measure passed by Democrats and Republicans in Congress that would terminate his emergency declaration for a wall on the border with Mexico.

The veto, made necessary after a strong and unusual rebuke from members of Trump's Republican Party, capped a week that left Trump politically wounded — at least temporarily.

Congress is unlikely to muster the votes to override the veto, a fact that left White House officials confident despite disappointment that it had passed the Republican-controlled Senate at all.

The bipartisan vote on Thursday was a slap at Trump for his decision to circumvent Congress and take money already designated for other programs to pay for a barrier on the southern border.

Twelve Republicans joined Democrats to pass the measure, concerned that the president had overstepped his authority.

Trump repeated his view that a crisis existed at the border, called the resolution reckless and said he was proud to veto the measure.

The emergency declaration is being challenged in court as an unconstitutional usurpation of Congress' power of the purse.

Democratic House Speaker Nancy Pelosi said her chamber would vote on March 26 to override the veto. The Senate would have to vote to override the veto as well, requiring more Republicans than the original 12 to sign on, which is unlikely to happen.

Trump was flanked by border officials and people whose relatives were killed by someone who was in the United States illegally. They praised him for standing firm on the issue, which resonates strongly with his political base.