President Donald Trump's plan to send $12 billion in emergency relief to American farmers who've been slammed by his administration's trade disputes with China and other countries has Gov. Phil Murphy scratching his head.

Why? Because it's roughly the same amount of money that could have been directed the New Jersey area's way for a new tunnel under the Hudson River.

The governor said Wednesday "it did not escape (his) attention" that $12 billion is "about what the federal government committed under the Obama administration" to help pay for the Gateway Tunnel to connect New Jersey with New York.

Trump, who seemed to signal his support for the program during a White House meeting last year, then threatened to shut down the federal government rather than fund the Gateway project.

Congress agreed, over Trump's objections, to include at least $540 million in various accounts that would be spent on Gateway.

"Believe me, we've noted the irony," Murphy, a Democrat, told reporters at a public event Wednesday.

Gateway consists of a new train tunnel under the Hudson River so that the existing tunnel can be closed to repair damage caused by Hurricane Sandy. The original agreement called for the states of New York and New Jersey to pay half the cost and the federal government to pay the other half. The project was estimated to cost $30 billion.

The allocation ran into trouble under the new presidential administration. Trump, a Republican, threatened to veto any legislation if Gateway funding was included.

One of Gateway's champions has been U.S. Senate Democratic Leader Chuck Schumer of New York, who has opposed Trump on most issues.

The final spending bill Trump signed into law included only a fraction of what was agreed upon among prior administrations.

"The new tunnel will get built -- that's not the question," Murphy said. "The question is will it be built because we've planned it and we did it the right way, or because we had a disaster and we had no other choice."

He said he remains optimistic the federal government will fund its share of the project, saying between 12 percent and 20 percent of the country's gross domestic product runs between Washington D.C. and Boston. That makes infrastructure connecting New York and New Jersey important, Murphy said.

On Monday, the Agriculture Department said it would tap an existing program to provide billions in direct payments to farmers and ranchers hurt by foreign retaliation to Trump's tariffs.

With congressional elections coming soon, the government action underscored Trump's concern about damage to U.S. farmers from his trade tariffs and the potential for losing House and Senate seats in the Midwest and elsewhere.

The administration said the program was just temporary and that they would not need congressional approval.

The program is expected to start taking affect around Labor Day. Officials said the direct payments could help producers of soybeans, which have been hit hard by retaliation to the Trump tariffs, along with sorghum, corn, wheat, cotton, dairy and farmers raising hogs.

The food purchased from farmers would include some types of fruits, nuts, rice, legumes, dairy products, beef and pork, officials said.

The Associated Press and NJ Advance Media staff writer Jonathan Salant contributed to this report.

Matt Arco may be reached at marco@njadvancemedia.com. Follow him on Twitter @MatthewArco or Facebook.