WASHINGTON — Republican leaders were scrambling Tuesday to reach an agreement on a short-term funding measure to avert a government shutdown at week’s end and address a host of high-profile issues — including a simmering battle over immigration — that have languished for months.

Lawmakers remained optimistic that both chambers would approve legislation to push back a Friday deadline to fund the government or shutter federal agencies for the first time in four years. That delay would give Congress a few more weeks to negotiate a long-term spending package.

But the plan appeared to hit a snag Tuesday as members of the conservative House Freedom Caucus and GOP leaders argued over the definition of “short-term.” Republicans postponed a vote on the temporary spending measure until Thursday, a day before the government is scheduled to run out of money.

“All members should be able to support this non-controversial, short-term legislation,” Senate Majority Leader Mitch McConnell argued.

At stake for Maryland are a number of initiatives President Donald J. Trump’s administration has threatened to cut, including federal funding for the Chesapeake Bay’s recovery and money for a Department of Homeland Security laboratory housed at Aberdeen Proving Ground in Harford County.

A government shutdown would have an outsized effect in a state that is home to some 300,000 federal workers — roughly 10 percent of the state’s workforce. Maryland officials estimate the state loses about $5 million a day in revenue when the federal government closes its doors.

Groups representing federal employees fretted that the jockeying marked a return to the budget brinkmanship of the Obama presidency, when Congress set up a series of showdowns that left agencies unable to plan for the future.

“If a short-term extension is approved, we hope Congress uses the extra time to enact spending bills that provide agencies with an adequate level of funding for the remainder of the fiscal year,” said Tony Reardon, president of the National Treasury Employees Union.

Fresh off a successful few weeks in which the House and Senate approved a massive tax overhaul, Republican leaders expressed confidence a shutdown could be avoided.

After backing out of a meeting with Trump last week, Democratic leaders said they would meet with the president on Thursday to discuss a way forward on funding.

That schedule, however, leaves little room for error. Without a bill, the government would shut down at midnight Friday.

The last federal shutdown was in 2013. Both Democrats and Republicans have been eager to avoid a repeat.

But Republicans remained at odds internally Tuesday over how long to push back the immediate deadline, with GOP leaders crafting a measure to keep the government open through Dec. 22 and conservatives lobbying for funding to continue through Dec. 30.

Placing the cutoff right up against Christmas recess, some lawmakers fear, would give Democrats additional leverage.

Rep. Andy Harris, a Baltimore County Republican and Freedom Caucus member, said he supports the longer funding measure and said he is confident lawmakers can approve legislation on time, “provided establishment liberals in D.C. don’t try to shut down the government over an amnesty deal for illegal aliens.”

Harris is also a member of the House Appropriations Committee.

Democrats hope to use their leverage in the budget fight to address an Obama-era program that permitted immigrants brought to the United States illegally as children to remain and work in the country. Trump rescinded the Deferred Action for Childhood Arrivals program in September, putting the onus on Congress to either save the program or end it.

Some 800,000 people, including an estimated 9,000 in Maryland, have qualified for the DACA protections. Harris previously said he is open to some form of program for DACA recipients but not “blanket amnesty” or an automatic path to citizenship.

Republicans hold majorities in both chambers of Congress and the White House but the GOP tends to split over funding measures. That means Republicans often need some Democratic votes in the House to fund the government — a reality that Democrats have used in the past to win concessions.

A similar dynamic plays out in the Senate, where Republican leaders need to 60 votes to approve funding legislation.

“You know, it's always a possibility, but it's certainly not what we hope for,” White House spokeswoman Sarah Huckabee Sanders said of a shutdown.

“That's not what we would like to see happen, and we're going to have meetings and try to make sure that it doesn't.”

Any final bill also could be a vehicle for other outstanding policy issues, including reauthorizing the Children's Health Insurance Program.

Signed into law by President Bill Clinton in 1993, that program provides health coverage to approximately 142,000 Maryland children through Medicaid and other standalone programs.

The program, which historically has received bipartisan support, technically expired in September. Maryland’s funding for the program could run out as soon as April.

McConnell said the short-term spending bill would include children’s insurance funding for states that are beginning to run out of money.

The national flood insurance program, meanwhile, also is set to expire Friday. The program paid out more than $21 million in claims in Maryland after Superstorm Sandy came ashore in 2012.

john.fritze@baltsun.com

twitter.com/jfritze