WASHINGTON — The Senate on Thursday failed to overturn President Trump’s veto of a resolution that would have terminated the national emergency he declared at the southwestern border. The defeat allows Mr. Trump to continue to defy Congress and divert federal funds to the construction of a border wall, his signature campaign promise.
The override attempt, the second such effort this year, failed when it fell short of the two-thirds majority needed to nullify a veto. But the 53-to-36 vote reflected concern among lawmakers in both parties about protecting Congress’s power to allocate federal funds and opposition to Mr. Trump’s plans to transfer billions of dollars in military construction money to build the border barrier.
Ten Republicans joined Democrats in supporting the measure.
Mr. Trump issued the veto Tuesday night, exactly seven months after using his first presidential veto to turn back a nearly identical resolution. Under the law, Congress can vote on such legislation every six months, and Democrats have used every opportunity to force Republicans to go on the record and choose whether to break with Mr. Trump, defending their prerogatives as legislators, or side with him.
The president declared the national emergency in February, after Democrats and Republicans in Congress rejected his efforts to secure $5 billion for the border wall, including during a 35-day government shutdown in which he repeatedly refused to accept any funding measure that failed to fund the edifice. The declaration, which Democrats have challenged in court, was Mr. Trump’s attempt to unilaterally seize money to pay for it anyway.
“He is ignoring the explicit will of Congress in order to build his ‘big, beautiful’ and useless vanity border wall,” said Senator Patrick J. Leahy of Vermont, the top Democrat on the Senate Appropriations Committee, in a statement after the veto message was sent to Congress. “President Trump has failed to convince Congress that his wall is a good idea, and he has failed to convince Congress that this is a real national emergency.”
The failed attempt to overcome Mr. Trump’s veto comes as lawmakers are grappling with how to designate funds for the administration’s immigration policies, including whether to devote more money to the border wall and replace the funds originally intended for military construction.
Government funds for all agencies will now run out on Nov. 21 after a short-term spending bill passed last month expires and lawmakers are eager to avoid another government shutdown over Mr. Trump’s wall.
But the Senate has yet to approve any of the dozen necessary spending bills, which will need to be reconciled with the House’s versions before Mr. Trump can sign the bills into law.
Senator Mitch McConnell of Kentucky, the majority leader, said on Thursday that the Senate would vote on at least one package of appropriations bills next week.
“Congress has fallen badly behind schedule on appropriations,” Mr. McConnell said. “We need to get moving. The country is watching. It’s time to make progress.”
Lawmakers are eager to advance the bills.
“I’m hoping we can move forward,” Senator Richard C. Shelby, Republican of Alabama and the chairman of the Senate Appropriations Committee, told reporters.
Some of the more contentious bills, including the measure that would fund the Department of Homeland Security, likely face a more contentious path to the president’s desk. Senate Republicans have included $5 billion for Mr. Trump’s wall in that bill while Democrats in both chambers have vowed to vote against any money for the wall.
While White House officials struck a budget agreement with congressional leadership earlier this year, it only set an outline for overall funding levels for military and domestic spending. In recent weeks, both chambers have exchanged offers on how to broadly divide the money among legislation dealing with domestic programs before hammering out the specifics of each of the bills.
Republicans have also objected to efforts from their Democratic counterparts to limit the president’s ability to again transfer money allocated to other agencies to the border wall, arguing that such language would be a violation of the budget agreement.
“I don’t want to say November 21 is a long time, but lots of stuff can happen between now and then,” said Senator Shelley Moore Capito, Republican of West Virginia, who leads the Appropriations subcommittee that funds the Department of Homeland Security.
“My bill’s the problem,” she added.
If lawmakers do not resolve the 12 spending bills before Thanksgiving, when the stopgap spending bill expires, a lapse in funding or efforts to pass another short term spending bill could potentially collide with an impeachment trial, which leaders believe could unfold in December.
Senator Jon Tester, Democrat of Montana, dismissed the idea that an impeachment inquiry could impact the appropriations work, adding, “if you can’t multitask, you probably shouldn’t be here.”
“We can hope,” added Mr. Tester, the top Democrat tasked with overseeing the Homeland Security funding. “I think that if there’s a will to do it and it will be done.”
Democrats have also said they intend to work to permanently restrict the president’s reprogramming abilities beyond the appropriations bills. Senator Patty Murray, Democrat of Washington and a member of the Appropriations Committee, could introduce legislation as early as next week that would prevent Mr. Trump and future presidents from taking money from military projects.
Such legislation, however, is unlikely to reach the Senate floor.
Catie Edmondson contributed reporting.