WASHINGTON — The government is heading for a shut down.

Congressional lawmakers failed to prevent a lapse in federal funding on Friday when a four-week budget extension plan stalled in the Senate. As a result, most non-essential government services will start closing Saturday morning, while many essential ones — like military missions — will continue even though workers won’t be paid.

Republicans blamed the budget impasse on Democratic leaders, who in recent days have pushed for any budget deal to include a fix to the expiring Deferred Action for Childhood Arrival policy on immigration.

“We know that with one noncontroversial and bipartisan vote, we can keep the government up and running,” said Senate Majority Leader Mitch McConnell, R-Ky. “Or our Democratic friends could continue to take the Democratic leader’s advice and vote to shut down the government, destabilize funding for our troops, shut down the children’s health care program, and still not get what they’re demanding on illegal immigration.”

But Democrats countered that the budget extension — which would have been the fourth in the last five months — is bad fiscal policy, and that Republicans should move ahead on a realistic full-year spending plan instead of short-term fixes.

This continuing resolution “is not an honest attempt to govern. as typical of this Republican majority,” said Senate Minority Leader Chuck Schumer, D-N.Y. “It was done with zero, zero negotiations with Democrats. They could get away with that strategy on the tax bill when they forced it through reconciliation. They can’t here.”

The final Senate chamber vote included a handful of Republicans voting against the budget measure, agreeing that a longer-term budget plan is needed, and several Democrats supporting it, arguing a shutdown must be avoided at all costs.

On Thursday, the measure passed the House largely along party lines, with similar partisan sparring. Negotiations between Democratic leaders and the White House Friday afternoon produced no breakthrough as the midnight deadline loomed. A flurry of last-minute alternatives shuttled between Senate offices late Friday night similarly fell short.

Lawmakers are expected to spend the weekend trying to negotiate a short-term solution. Meanwhile, White House officials are working to minimize the effect and visibility of the shutdown.

In 2013, during the last extended government shutdown, the effects were readily apparent. Hundreds of thousands of government workers were furloughed, military support services like commissaries and medical clinics were shuttered, and national parks were declared off limits.

Officials in President Donald Trump’s White House have a starkly different interpretation of this appropriations lapse.

Parks are expected to stay open, though with limited staff. Fewer workers will be sent home, although the number will still total hundreds of thousands. Agencies have been instructed to review what funds may still be available to keep operations as close to normal as possible.

Earlier in the day, Office of Management and Budget Director Mick Mulvaney accused former President Barack Obama of “weaponizing” the government shutdown in an effort to score political points.

“They could have made the shutdown in 2013 much less impactful, but they chose to make it worse,” he said. “So it will look different this time around.”

Still, an extended shutdown will have a significant impact on numerous government agencies, particularly the military. Troops will be required to work without pay during the funding lapse, a situation that defense leaders have described as devastating to morale. Paychecks due out next Friday will arrive as scheduled, but subsequent ones will be delayed.

In 2013, just hours before the shutdown deadline arrived, lawmakers passed emergency legislation to prevent service members’ salaries from being hurt. Similar legislation is pending in Congress now, but was not adopted before the midnight deadline.

Military training not related to overseas operations will cease starting Saturday. Other non-essential programs like family support services will also be halted.

Ahead of the vote, Defense Secretary James Mattis criticized the latest budget impasse and the continued budget gridlock on Capitol Hill in recent years. Since October 2016, the government has been operating under short-term resolutions instead of a full year budget for all but five months.

“We need Congress back in the driver’s seat of budget decisions, not in the spectator seat of the Budget Control Act’s indiscriminate and automatic cuts,” Mattis said. “We need a budget and we need budget predictability if we’re to sustain our military’s primacy.”