TRENTON - New Jersey will be credited nearly half the $271 million it owes for a scrapped rail tunnel to New York City, but only if it repays the entire debt, the federal government said.

The federal government will mitigate the impact of repayment on New Jersey taxpayers once it gets its money back, Transportation Secretary Ray LaHood told Sen. Frank Lautenberg (D., N.J.), in a letter dated Tuesday and obtained by the Associated Press.

"The [Federal Transit Administration] is being fair and equitable in its treatment of NJ Transit," LaHood wrote.

He said the government was willing to forgo repayment of $22 million spent on engineering and environmental work. However, he said, it is required to get back the rest of the money that was spent on the now-abandoned tunnel.

If NJ Transit repays the $271 million, LaHood said, the Transportation Department will transfer $128 million back to the state's Congestion Mitigation Air Quality account, allowing money set aside for the tunnel to be used for other projects.

Lautenberg has been negotiating with federal transit authorities to get the bill reduced. Gov. Christie recently approved the hiring of a Washington law firm to fight the tab.

Christie's office said it had not heard from LaHood.

"If and when we are contacted by the secretary, we will review their proposal," Christie spokesman Michael Drewniak said.

Lautenberg, who helped secure the federal money for the project, said he was pleased with the result.

"I have been working since the day Gov. Christie unwisely killed the project to clean up this mess and reduce the cost to taxpayers in our state," he said in a statement. "I am pleased that the federal government has agreed to cut the ultimate cost to our state nearly in half - $128 million - and I will continue to look for other ways to ease the fallout from the governor's ill-advised decision."

Christie spiked the project in October because of potential overages, which he said could have totaled $2 billion to $5 billion over the project's $8.7 billion price tag. At the time, it was the most expensive public works project under way in the nation.

The Federal Transit Administration and Port Authority of New York and New Jersey had each pledged $3 billion to the project. New Jersey's share was $2.7 billion. The state and the Port Authority would have been responsible for any cost overruns.

LaHood said Christie knew the state would be on the hook to return the federal money already spent if he walked away from the project.

The Christie administration signed a work agreement in April saying New Jersey would repay the government if the state "failed to live up to its final commitments."