As his second and final term comes to an end, Gov. Chris Christie has committed the state to its share of funding the now $12.7 billion Gateway Hudson Tunnel Project, something that should have been done seven years ago.

About 750,000 people a day ride the rails between New Jersey and Manhattan. That makes the rail tunnels under the Hudson River essential to commuters’ livelihoods and the state economy.

The two single-track tunnels used by NJ Transit and Amtrak were built in 1910 and damaged by Hurricane Sandy. They have to be rebuilt soon, and just taking one out of service at a time for the work would reduce the cross-river capacity by 75 percent, according to a Common Good report.

The federal government in 2010 proposed building a new two-track tunnel to add needed capacity and enable the existing tunnels to be rehabilitated without a commuter nightmare. It offered to pay half the cost, with New Jersey and New York splitting the rest.

Christie rejected the project, saying the costs would likely be higher and heavily indebted New Jersey couldn’t afford it. The state’s Transportation Trust Fund already was using its annual $895 million in gas, sales and other tax revenue just to cover the interest on debt.

Derailing the project just ensured the necessary and eventual work would cost even more and wouldn’t be done when it could help the state rebound from the severe recession of 2007-09. The U.S. Government Accountability Office figured it would have created 200,000 jobs, generated $9 billion in business revenue and increased federal, state and local tax revenue by $1.5 billion during nine years of construction.

The plan announced last week commits New Jersey to providing $1.9 billion, New York $1.75 billion and the Port Authority of New York and New Jersey $1.9 billion. It assumes the Trump administration will still be willing to pick up half the overall cost.

New Jersey would get its funding from a surcharge on rail trips to Manhattan that would start at 90 cents in 2020, increase to $1.70 in 2028 and then to $2.20 in 2038.

Gov.-elect Phil Murphy, a supporter of the project, nonetheless complained about the bi-state agreement and said he would see “whether there were alternatives that did not involve further fare hikes.”

We can’t imagine alternatives other than raising taxes or increasing debt, both exactly the opposite of what New Jersey needs to do.

Besides, rail travelers to New York would be the beneficiaries of the Gateway Project, so the surcharge is in keeping with the trend of shifting costs of government services to the users who directly benefit from them. NJ Transit last raised fares by an average 9 percent in 2015, not that long ago. But that was just to cover its inefficient, overpriced operational costs. In return for paying the surcharge, commuters will get more convenient and safer travel through greatly increased tunnel capacity.

The interesting aspect is that Christie could have chosen to fund the project with a ticket surcharge in 2010. We think he didn’t because that was early in his first term and it might have cost him his re-election, regardless of the project’s need and appropriateness of the funding method.

The same concern probably delayed until his second term agreeing with Democrats to raise the gasoline tax to restore the Transportation Trust Fund.

If politicians spoke openly about such situations, they’d probably lament that sometimes the public’s aversion to what needs to be done makes them proceed in less optimal, more wasteful ways.

That’s true to a degree, but elected officials’ aversion to cutting spending also drives this sort of dysfunction.

Grand compromises that would work better for all while sharing the pain more equitably are often possible, but only once politicians and the public get better at democracy and governance.