Updated

The Democratic-controlled House fell short Tuesday in its effort to override President Donald Trump's first veto, handing him a victory in his drive to spend billions more for constructing barriers along the Southwest border than Congress has approved.

Lawmakers voted 248-181 in favor of overturning his veto, mostly along party lines, but that was 38 votes shy of the number needed for the required two-thirds majority.

The outcome, not a surprise, enabled Trump to move forward on an issue that was a hallmark of his 2016 presidential campaign and of his presidency. Yet the vote also gave Democrats a way to refocus on policy differences with Trump, days after Attorney General William Barr gave the president a political boost by saying special counsel Robert Mueller had concluded that Trump had not colluded with Russia to influence his election.

Congress sent Trump a resolution this month annulling the national emergency that Trump had declared at the US-Mexico border. That included passage by the Republican-led Senate, in which 12 GOP senators — nearly 1 of every 4 — voted with Democrats to block him.

Trump vetoed that measure almost immediately.

Trump had declared the border emergency under a law that lets him shift budget funds to address dire situations. His plan is to shift an additional $3.6 billion from military construction projects to work on border barriers. Congress voted this year to limit spending on such barriers to less than $1.4 billion, and Democrats called his declaration a gambit for ignoring lawmakers' constitutional control over spending.

"We take an oath that we must honor" to protect the Constitution," said House Speaker Nancy Pelosi, D-Calif., speaking on her 79th birthday. "The choice is simple, between partisanship and patriotism. Between honoring our sacred oath or hypocritically, inconsistently breaking this oath."

Rep. Joaquin Castro, D-Texas, called Trump's declaration "constitutional vandalism."

Republicans said Trump was merely acting under a law that gives presidents emergency powers, and was trying to head off Democrats with little concern about border security.

Rep. Tom McClintock, R-Calif., said Trump was acting against the "radical left in this House that would dissolve our borders entirely if given the chance" — a stance that no Democrat has taken.

Rep. Paul Mitchell, R-Mich., called the veto override effort "a partisan whack job" because of its certain defeat.

Fourteen Republicans, a mix of conservatives plus moderates from swing districts, joined all voting Democrats in favor of the override. It was the same 13 who opposed the veto in last month's House vote plus Rep. John Katko, R-N.Y., who missed that roll call.

In a symbolic move by Democrats, presiding over the debate and vote was freshman Rep. Veronica Escobar, D-Texas, representing a district surrounding El Paso along the Mexican border.

Tuesday's vote was the legislative finale of a showdown that's been building for months.

Even with his veto remaining intact, Trump may not be able to spend the money for barriers quickly because of lawsuits that might take years to resolve.

Democrats were hoping to use the border emergency battle in upcoming campaigns, both to symbolize Trump's harsh immigration stance and claim he was hurting congressional districts around the country.

The Pentagon sent lawmakers a list last week of hundreds of military construction projects that might be cut to pay for barrier work. Though the list was tentative, Democrats were asserting that GOP lawmakers were endangering local bases to pay for the wall.

Opponents of Trump's emergency warned that besides usurping Congress' role in making spending decisions, he was inviting future Democratic presidents to circumvent lawmakers by declaring emergencies to finance their own favored initiatives.

Trump supporters said he was simply acting under a 1976 law that lets presidents declare national emergencies. Trump's declaration was the 60th presidential emergency under that statute, but the first aimed at spending that Congress explicitly denied, according to New York University's Brennan Center for Justice, which tracks the law.

The House approved the resolution blocking Trump's emergency by 245-182 in February. On Tuesday, Trump opponents will need to reach 288 votes to prevail.

This month, the GOP-led Senate rebuked Trump with a 59-41 vote blocking his declaration after the failure of a Republican effort to reach a compromise with the White House. Republicans were hoping to avoid a confrontation with him for fear of alienating pro-Trump voters.

With the House override failing, the Senate won't attempt its own override and the veto will stand.