(Bloomberg) -- Congressional leaders and the White House reached a handshake deal to fund the US government through Sept. 30, according to people familiar with the negotiations, after six months of bitter ideological clashes delayed finishing an annual spending plan.

Lawmakers will now race to pass the agreement before a midnight Friday deadline for a partial government shutdown. The first task will be putting the accord in writing, which could take several days.

President Joe Biden said in a statement Tuesday he would sign the spending package into law.  

The consensus came on Monday night after funding for the Department of Homeland Security — the final obstacle in weeks of talks — was resolved.  White House and House Republican negotiators sealed the agreement after tense talks over the weekend delayed release of the package. 

Congressional aides still need to finish writing the text of the bill and a short shutdown over the weekend is possible as Congress prepares to vote on the legislation. 

Under House rules, bills must be published for 72 hours before a vote and the Senate would require agreement of all 100 senators to vote on any bill before the end of the week. House rules can be waived and senators could agree to hold a vote if they are given the opportunity to offer amendment votes, however. 

The deal includes roughly $1.1 trillion in funding for the departments of Defense, Homeland Security, State, Treasury, Labor, Health and Human Services, and Education. Funds for the Securities and Exchange Commission and the legislative branch are also in the package.

Disagreements over funding for border security and processing of undocumented migrants had been an impediment in the Homeland Security talks.

Without the funding, these agencies face a Saturday shutdown deadline after which non-essential workers would be furloughed. Essential workers such as military troops would work without pay. 

Top Senate spending panel Republican Susan Collins said that a short-term bill may be necessary.

“It’s really important that we avoid a government shutdown,” she said.

Financial markets have shrugged off the five previous shutdown deadlines since the Oct. 1 start of the federal fiscal year, assuming lawmakers would seek to avoid a politically damaging shutdown in an election year. 

--With assistance from Jordan Fabian.

(Updates with Susan Collins in 10th and 11th paragraphs. An earlier version of this story corrected bill details. The Commodity Futures Trading Commission was funded in an earlier bill.)

©2024 Bloomberg L.P.