A long-fought legal battle to recover $8.9 billion in damages from Exxon Mobil Corporation for the contamination and loss of use of more than 1,500 acres of wetlands, marshes, meadows and waters in northern New Jersey has been quietly settled by the state for around $250 million.

The lawsuits, filed by the State Department of Environmental Protection in 2004, had been litigated by the administrations of four New Jersey governors, finally advancing last year to trial. By then, Exxon’s liability was no longer in dispute; the only issue was how much it would pay in damages.

The stakes were high, given the enormous cost the state’s experts had placed on restoring and replacing the resources damaged by decades of oil refining and other petrochemical operations, as well as of the public’s loss of use of the land.

“The scope of the environmental damage resulting from the discharges is as obvious as it is staggering and unprecedented in New Jersey,” the administration of Gov. Chris Christie said in a court brief filed in November.