After weeks of tense negotiations and drawn-out debate, leaders of both parties on Wednesday said that they’ve all but finalized an agreement on a massive package to fund the government through September and prevent a shutdown on Saturday.

“We’re finalizing the details and I feel like we’re in a very good place,” Speaker Paul Ryan Paul Davis RyanKenosha will be a good bellwether in 2020 At indoor rally, Pence says election runs through Wisconsin Juan Williams: Breaking down the debates MORE (R-Wis.) said as he left his Capitol office after meeting with the other top leaders of both parties.

He said the final omnibus package would be released “very soon.”

ADVERTISEMENT

Emerging from the meeting moments before, Senate Minority Leader Charles Schumer Chuck SchumerRepublican senator says plans to confirm justice before election 'completely consistent with the precedent' Video of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral Graham signals support for confirming a Supreme Court nominee this year MORE (D-N.Y.) said a deal is imminent.

“We’re feeling very good about this,” Schumer said. “We’ve accomplished many, many, many of our goals. When it’s unveiled, you will see. We’re not going to get into any more details.”

The Republicans’ self-imposed three-day rule stipulates that Friday is the earliest they could bring the bill to the floor, but the House Rules Committee has said it will be waived to allow for an earlier vote.

Ryan has told lawmakers that the House will vote on the omnibus Thursday, according to sources.

One of the unresolved issues prior to the meeting was whether to include money for a rail and tunnel project in the Northeast corridor. The Gateway project is a top priority for Schumer and other lawmakers in New York and New Jersey, but Trump has threatened to veto the funding package if it contains $900 million for the project.

An agreement was reached that will allow the project to tap up to $541 million in federal funds by making additional money available through an Amtrak account and another state grant program that doesn’t require approval from the Department of Transportation, according to a source familiar with the discussions.

ADVERTISEMENT

Democratic leaders were also still making an eleventh-hour push to include more gun provisions to the bill, according to an aide, including lifting a ban on federal research on gun violence.

GOP leaders have already signaled that they want to include a narrow background check bill for gun purchases, as well as an increase in funding for school safety. The expanded provision the Democrats are seeking would empower the Centers for Disease Control and Prevention to examine gun violence as a public health issue, which is essentially banned under current law.

Another issue that remains in contention is how to fix the so-called grain glitch, a provision of the Republicans’ new tax law that lends a generous cut to co-ops. Critics, including many Republicans, maintain it’s a benefit that comes at the expense of other small farmers. Yet the solution they’ve sought for the omnibus has been rejected by the Democrats, who say it leans too far in favor of agricultural behemoths like Cargill at the expense of small producers.

A senior GOP source confirmed that the background check bill, money for school safety and the co-op fix will all be in the final spending measure.

Action on ObamaCare subsidies for low-income people — an issue that got a lot of early attention — has fallen out of the talks, said the Democratic aide, due to the Republicans’ insistence that the provision be accompanied by Hyde Amendment language that prevents federal funding of abortion services.

“There’s not been any evidence that Republicans are going to back off of expanding Hyde,” the aide said.

The spending package will contain money for border barriers, but not a concrete border wall — one of Trump’s top priorities, and another contentious issue that had been holding up the talks.

Trump hoped to win $25 billion in money that could be put in a trust for the wall along the border.

It appears the spending legislation will fall well short of Trump's demands, but could include $641 million for 33 miles of new border fencing. It will also include $1.296 billion in funding new border technology.

The funding would only be used for levees and fences, not a concrete wall, according to the source familiar with the discussions.

The immigration provisions do not include new detention beds or an increase in enforcement agents, said the aide. Both of those changes had been pushed by conservatives, but were a non-starter with Democrats.

Negotiators agreed the bill would not include new provisions aimed at Planned Parenthood or action on "sanctuary cities," which do not cooperate with federal immigration authorities.

The omnibus also will contain $4 billion to combat the opioid crisis and an extra $21.2 billion for infrastructure.

Scott Wong contributed.

Updated at 12:19 p.m.