WASHINGTON (AP) — With just a week left to avert a government shutdown, new House Speaker Mike Johnson is facing his first big test as he tries to win House Republican support for a short-term funding plan — a task that looks increasingly difficult amid stubborn divisions in the party over federal spending.

Federal agencies are making plans for a shutdown that would shutter government services and halt paychecks for millions of federal workers and military troops.

It’s a disruption that Johnson — just two weeks into his job running the House — has said he wants to avoid. Yet House lawmakers left Washington for the weekend without a plan in hand after several setbacks. Johnson is still sounding out support among Republicans about what to do and is expected to unveil funding legislation over the weekend, according to Republicans granted anonymity to discuss internal deliberations.

The shrinking calendar gives Johnson, a Louisiana Republican who has vaulted from the lower ranks of Republican leadership to the speaker’s office, a narrow window to corral an unpredictable GOP conference.

“We’re running up against the clock on Nov. 17, and we’re obviously aware of that,” Johnson said this week, referring to the date that government funding expires. “But we are going to get the job done.”

Hardline conservatives, usually loathe to support temporary spending measures of any sort, had indicated they would give Johnson some leeway to pass legislation, known as a continuing resolution, to give Congress more time to negotiate a long-term agreement. Congress passed a 47-day continuing resolution in October, but the fallout was severe. Kevin McCarthy was booted from the speakership days later, and the House was effectively paralyzed for most of the month while Republicans tried to elect a replacement.

Republicans eventually were unanimous in electing Johnson speaker, but his elevation has hardly eased the dynamic that led to McCarthy’s removal — a conference torn on policy as well as how much to spend on federal programs. This week, Republicans had to pull two spending bills from the floor — one to fund transportation and housing programs and the other to fund the Treasury Department, Small Business Administration and other agencies — because they didn’t have the votes in their own party to push them through the House.

“I thought we were going to show the speaker a little bit of grace,” said a frustrated Rep. Troy Nehls, R-Texas, as he exited the Capitol Thursday after the last votes of the week. “I think it’s looking like we’re still confused and we are not united.”

Johnson has turned to House Republicans for ideas on how to win support for a continuing resolution. He has floated the obscure idea of a “laddered” approach that would fund some parts of the government until early December and other federal departments until mid-January. He has also raised the idea of a funding package that would last into January.

Meanwhile, lawmakers are still looking for a way to negotiate final passage of aid for Israel in its war with Hamas, and Johnson has also proposed the formation of a new federal commission focused on slowing increases in the national debt that threaten the government’s ability in future years to finance the military and major entitlement programs relied on by seniors and the disabled.

Democrats have made it clear they will not support any funding packages that include policy wins for conservatives. Rep. Hakeem Jeffries of New York, who the Democratic leader in the House, said they would not “pay a single, right-wing ransom demand” as part of a funding resolution.

Democratic lawmakers are also eager to play up the House Republican divisions and to pin any blame for a shutdown squarely on the new speaker and his GOP colleagues.

“They are a divided, divisive, dysfunctional majority,” said Rep. Steny Hoyer, D-Md. “They can’t get their business done, to the detriment of Americans.”

On the other side of the Capitol, the Democratic-held Senate took procedural steps Thursday that would allow it to take up a continuing resolution in time to avoid a partial shutdown. Senate Majority Leader Chuck Schumer said negotiations could evolve in the coming days, but added that a shutdown cannot be avoided without bipartisan cooperation.

“I implore Speaker Johnson and our House Republican colleagues to learn from the fiasco of a month ago: Hard-right proposals, hard-right slashing cuts, hard-right poison pills that have zero support from Democrats will only make a shutdown more likely,” Schumer said. “I hope they don’t go down that path in the week to come.”

But the Senate is also involved in delicate negotiations involving changes to border policy and funding for Ukraine. Republican senators have demanded that Congress pass immigration and border legislation alongside additional Ukraine aid.

This week, they released a plan to resume construction on parts of the U.S.-Mexico border wall, curtail humanitarian parole for people who cross into the United States and make it more difficult for migrants to qualify for asylum. That kickstarted the work of a bipartisan group of senators who are considering a limited set of policy changes that could find favor with both Republicans and Democrats.

“It remains a high-wire act,” Sen. Chris Murphy, a Democrat from Connecticut who is involved in the negotiations.

He said the chances of bringing together a border bill by next week were slim, adding, “There’s a reason why we haven’t done bipartisan immigration reform in 40 years.”

Meanwhile, a bipartisan group of senators is also pushing for a debt commission that could be lumped in with the continuing resolution, known as a “CR” in Washington.

“I think it could get on the CR,” said Sen. Joe Manchin, D-W.Va. “I think it would be something they can really run with.”