Congress voted overwhelmingly Friday to keep federal agencies open for another week, defying President Trump’s desire for action on both a border wall and overhauling the health-care system by concentrating on what lawmakers viewed as the greater priority — avoiding a government shutdown.

But the sense of accomplishment may be short-lived. With several unresolved differences remaining in the ongoing bipartisan negotiations over spending, lawmakers planned to work through the weekend to finalize a longer-term deal that would fund the government through the end of the fiscal year in September.

“We’re willing to extend things for a little bit more time in hopes that the same sort of progress can be made,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said Friday morning.

Meanwhile, White House officials and conservative House Republicans continued to press for a vote on revised health-care legislation that was brokered this week, aiming for as early as next week. That effort, driven by Trump’s ambitions for a legislative accomplishment at his presidency’s 100-day mark, could disrupt budget talks just as they did this week.

House Freedom Caucus Chairman Mark Meadows (R-N.C.), who has been working directly with the White House on health care, plans to keep working to convince skeptical Republicans to back the measure. Meadows said Friday that he had wanted the House to pass the bill before this weekend but acknowledged that some GOP members, including some moderates, remain uneasy about components of the legislation. A particular point of contention included language to give states flexibility over insurance regulations and mandated categories of coverage.

“If it takes another couple of days, so be it,” Meadows told reporters. “I don’t think it has to be voted on next week, I certainly would be disappointed if it weren’t.”

House GOP leaders announced late Thursday that there would be no vote on health-care legislation Friday, despite the efforts of Meadows and the White House. Leaving a 90-minute meeting in the office of House Speaker Paul D. Ryan (R-Wis.), House Majority Leader Kevin McCarthy (R-Calif.) said that the main focus of the huddle was to ensure that the one-week funding bill would pass — and he denied that leaders had ever wanted to vote by Friday.

“We’re still educating members,” he said. “We’ve been making great progress. As soon as we have the votes, we’ll vote on it.”

Top staff and leaders on both chambers’ appropriations committees had tried late Thursday to reach a longer agreement to keep government open through the end of the fiscal year, in September, but were unable to resolve differences on several unrelated policy measures that have plagued the process since the beginning, according to several congressional aides familiar with the talks.

The failure to revive the health-care bill was yet another blow to Trump as he worked to tout his early accomplishments in a speech to the National Rifle Association Friday in Atlanta. While congressional leaders in both parties have focused primarily on the budget, Trump, Vice President Pence and other top administration officials have been at the center of the attempt to pressure Republican lawmakers into a new agreement to revise the Affordable Care Act.

In recent weeks, Trump plowed into health-care negotiations not only by wooing members of the conservative House Freedom Caucus but also by trying to forge a bond with Rep. Tom MacArthur (R-N.J.), the co-chairman of the moderate Tuesday Group. He was the only moderate represented in the recent talks.

Instead of delving into details, MacArthur and Trump would often talk about the president’s late father, Fred, whose black-and-white portrait sits alone on a desk in the Oval Office.

“I knew his father for many years and have handled his insurance,” MacArthur, a former insurance executive, said. “Fred had thousands of apartments in Brooklyn and I’d go out with him to settle claims, sitting in the back of the car with him and talking.”

Trump also relished stories of “Fred and I getting sandwiches,” MacArthur added. “I told him I saw that same decisive way, the same humor.”

By last weekend, an amendment crafted by MacArthur became the crux of the White House’s deal with the Tuesday Group and the Freedom Caucus.

MacArthur said there is more of Trump’s father in him than people realize: “He reached out again and again, in determination.”

Rep. Jim Jordan (R-Ohio), a senior member of the Freedom Caucus, said Pence also has been crucial in keeping the relationship between the White House and that conservative bloc strong in the wake of the health-care bill falling apart last month.

“I don’t know how many meetings I’ve had with him,” Jordan said. “It’s been unbelievable.”

Jordan said that Pence, White House budget director Mick Mulvaney and Health and Human Services Secretary Tom Price — all former House GOP lawmakers — and longtime House aide Paul Teller, who now works at the White House, have been working the Freedom Caucus constantly for the last two weeks, often bypassing House Republican leadership as they’ve worked to revise the bill to the liking of his caucus.

“We’ve talked and talked, and they’ve talked with Mark Meadows every day,” Jordan said, with Trump concentrating on working Meadows while Pence has been more in touch with Jordan and other members.

“There was a while where the vice president was on Capitol Hill every day and over the recess, they’ve been keeping up with everybody by phone. Remember, the vice president was someone who was a mentor to many of us, he knows the House.”

But the stalled talks demonstrated again how divided Republicans remain about how to overhaul Obamacare, despite seven years of GOP promises to repeal and replace the 2010 law. Conservatives and moderates have repeatedly clashed over the contours of such a revamp, most sharply over bringing down insurance premiums in exchange for limiting the kind of coverage that is required to be offered.

As many as 15 or so House Republicans have said that they will not support the latest GOP proposal. That leaves Ryan and the White House an incredibly narrow path for passage. The speaker can lose only 22 Republicans on a health-care vote because Democrats have fiercely opposed any attempt to repeal the current health care law.

David Weigel and Paul Kane contributed to this report.