Sen. Joe Manchin speaks to reporters in the Senate Subway during a vote in the Capitol earlier this month in Washington, DC.
CNN  — 

The Senate voted on Tuesday to take up a stop-gap bill that would keep the government funded through December 16 as lawmakers work to avert a shutdown by the end of the week.

The vote had earlier been on the verge of failing due to the inclusion of a controversial permitting reform proposal, but West Virginia Sen. Joe Manchin dropped a request to include the proposal after it came under sharp criticism from Republicans and liberals.

The Senate will next need to hold a final vote on the stop-gap funding bill. Exact timing of that vote has yet to be determined, but lawmakers are expected to pass that short-term funding extension through both chambers and avert a shutdown before funding expires on Friday at midnight. The tally for Tuesday’s vote was 72 to 23.

Senators released the legislative text of the stop-gap funding bill overnight. In addition to money to keep government agencies afloat, it provides around $12 billion for Ukraine as it continues to face Russian military attack, and would require the Pentagon to report on how US dollars have been spent there. The aid to Ukraine is a bipartisan priority.

The continuing resolution also would extend an expiring FDA user fee program for five years.

Manchin’s permitting proposal would have expedited the permitting and environmental review process for energy projects – including a major pipeline that would cross through Manchin’s home state of West Virginia. Senate Democratic leaders had been pushing to pass it along with government funding as a result of a deal cut to secure Manchin’s support for Democrats’ controversial Inflation Reduction Act – a key priority for the party – which passed over the summer.

But Republicans had been warning they will vote against the effort to tie permitting reform to the funding extension, in part because they don’t want to reward Manchin over his support for the Inflation Reduction Act.

The timing of the fight continues a pattern by Capitol Hill leaders in recent years of negotiating until the last minute to fund the federal government, leaving virtually no room for error in a series of events where any one senator could slow the process down beyond the deadline.

Neither party wants to be blamed for a shutdown – especially so close to the high-stakes November midterm elections where control of Congress is at stake and as Democrats and Republicans are both trying to make their case to voters that they should be in the majority. Many lawmakers are also eager to finish up work on Capitol Hill so they can return to their home states to campaign.

Senate Minority Leader Mitch McConnell took issue with the permitting reform proposal in his Senate floor remarks on Tuesday, describing it as a “poison pill,” and saying he would oppose the vote as a result.

“Both sides of the aisle want to prevent a government shutdown that no one wants,” he said. “Unfortunately our Democratic colleagues decided to put in extraneous, partisan language – in fact, a poison pill.” He went on to say, “The poison pill is a phony attempt to address an important topic — permitting reform.”

“I’ll be voting no and I would urge all my colleagues to vote no as well,” he said.

Sen. Richard Shelby of Alabama, the top Republican on the Senate Appropriations Committee, said he will vote against the measure because of its inclusion of the Manchin plan.

“We have made significant progress toward a continuing resolution that is as clean as possible. But, if the Democrats insist on including permitting reform, I will oppose it,” he said in a statement.

On Tuesday morning, Manchin continued to call for his colleagues to support his energy permitting text in an interview with CNN, but acknowledged he may not have the votes for it to pass with McConnell urging his colleagues against the measure.

“I’m not going to second guess what Mitch would do and what his motives are,” he told CNN’s Brianna Keilar on “New Day.” “I think there’ll be a time when he looks back, if he really evaluates this well, that we never had this opportunity to take a major step forward, that we’re all in sync with – permitting reforms need to be done for the United States to meet the energy challenges.”

At the same time, some liberal members of the Senate Democratic caucus have expressed concern over environmental impacts. Independent Sen. Bernie Sanders of Vermont is urging colleagues to oppose what he describes as a “big oil side deal.”

Manchin released legislative text last week for his permitting reform proposal that he wants to see included as part of the continuing resolution – and now the West Virginia senator is working to try to get 60 votes to advance both permitting reform and the government funding extension together.

A Manchin aide told CNN that the senator has been “working the phones all weekend” and has secured several more Republican votes.

In another sign, however, of the headwinds facing the plan, Virginia Democratic Sen. Tim Kaine released a statement explaining that he would vote against proceeding to the bill for government funding as a result of the permitting measure.

“I strongly oppose the Mountain Valley Pipeline provision of this legislation, which would greenlight this pipeline without normal administrative and judicial review and ignore the voices of Virginians,” Kaine said in a statement.

“I will vote against the motion to proceed to this deal and urge my colleagues to do the same. We should pass a continuing resolution that is free of the unprecedented and dangerous MVP deal,” he said.

This story and headline have been updated with additional developments.

CNN’s Manu Raju and Daniella Diaz contributed to this report.