As much as $541 million would be available for rail tunnel and bridge projects linking New Jersey and Manhattan, which advocates call some of the most important infrastructure work in the U.S., in a compromise spending deal being wrapped up in Congress.

The $1.3 trillion spending bill nearing release Wednesday makes additional funding available to the Gateway program through Amtrak and grants that don’t require approval from the U.S. Department of Transportation, plus an extra $2.9 billion in discretionary grants for which project sponsors can apply, according to a person familiar with the details.

Project advocates, mainly Democratic and Republican lawmakers from New York and New Jersey, were seeking $900 million for Gateway. But President Donald Trump was opposed to funding the project and pressed congressional leaders to keep it out of the spending compromise that has been in the works for more than a month.

Trump may go along because language in the bill specifically steering other funds to Gateway has been removed.

The Gateway program is a series of projects that include a rail tunnel under the Hudson river and new Portal North Bridge to replace century-old infrastructure along a transportation corridor of the northeast U.S. Funding for the project was one of the major disagreements that delayed the spending deal to fund the government for the rest of the fiscal year.

The spending bill likely will get a vote in the House on Thursday, followed by the Senate the next day.

Amtrak Funding

The plan includes additional money for Amtrak’s Northeast Corridor account, and Amtrak estimates it will be able to contribute at least $388 million directly to Gateway projects, according to the person, who asked for anonymity because the details haven’t been publicly released. There’s also $153 million for New York and New Jersey in grant and formula funds that can be used to help cover expenses on Gateway-related projects, the person said.

Additional money also is being added to programs including Capital Investment Grants for transit projects for which Gateway sponsors could apply, but the Trump administration has more control over that funding.

The Federal Transit Administration assigned a rating of “medium-low” to both the tunnel and Portal North Bridge projects as part of the Gateway program in November, putting them behind other U.S. projects for funding.

Transportation Secretary Elaine Chao has objected to Gateway funding on grounds that almost all proposed money for the tunnel project would be federal through either loans or grants, depriving other U.S. projects. State officials say they’re using local money to repay federal loans, and that other projects use federal loans as the local funding share.