The firm at the heart of a Ohio train derailment and chemical spill will pay $310m (£243m) in a settlement to the US government.
Norfolk Southern will pay $235m to cover the cost of cleaning up contaminated air, water and soil in East Palestine.
The February 2023 derailment led to a fire that burned through hazardous cargo. Toxic fumes killed thousands of animals and forced many residents to flee.
In April, Norfolk Southern reached a separate $600m class-action settlement with residents of the town.
The US Environmental Protection Agency (EPA) and Justice department sued Norfolk Southern less than two months after the derailment last year.
The lawsuit sought penalties and injunctive relief "for the unlawful discharge of pollutants, oil and hazardous substances" under the US Clean Water Act.
The settlement, announced by the US Department of Justice on Thursday, requires Norfolk Southern to pay for long-term environmental monitoring, mental health services for residents and take steps to improve rail safety.
The company must also now pay a $15m civil penalty over alleged violations of the Clean Water Act.
"Those who will benefit most directly from this settlement are those who were most directly affected by the disaster," acting associate attorney general Benjamin Mizer said in a statement.
"Rail safety commitments will help prevent future catastrophic railway events," Mr Mizer added.
A total of 38 train wagons were derailed in the crash, 11 of which were carrying hazardous materials.
Residents later reported feeling unwell, both with physical symptoms and lingering psychological trauma from the incident.
Environmental officials also estimated that nearly 45,000 animals - mostly aquatic species - died within a 5 mile (8km) radius.
"No community should have to experience the trauma inflicted upon the residents of East Palestine," EPA administrator Michael Regan said on Wednesday.
"Because of this settlement, residents and first responders will have greater access to health services, trains will be safer, and waterways will be cleaner."
In a joint statement published hours after the settlement was announced, Ohio Senator JD Vance and Attorney General Dave Yost - both Republicans - said that the deal risks "undercompensating" the residents of East Palestine.
The statement added that residents have been left in the dark about a decision to "vent and burn" the derailed train cars.
"The residents of East Palestine deserve full compensation to account for the hardships they have faced," Mr Vance and Mr Yost said. "But they also deserve the full truth about why the derailment and vent and burn occurred."
The settlement still must be approved by a federal judge. A hearing for final approval is scheduled for 25 September.
A separate $600m class-action settlement was reached between Norfolk Southern and town residents last year.
In total, Norfolk Southern estimates that it will spend more than $1bn on its response to the derailment, including $200m on new rail safety measures and $780m on its environmental response.