Earlier this month, Mexico City officials said they were opening criminal cases against people and companies involved in building the Metro's Line 12 and urged the firms to quickly come to settlement deals.

Grupo Carso denied responsibility for the accident. It said that despite disagreement on what caused the incident and in order to not further delay the rehabilitation and reinforcement work, it "agreed to resolve in advance the legal procedures associated with this unfortunate event" by inking Wednesday's agreement.

The firm said it has told the attorney general's office it is interested in participating in a compensation fund for the accident's victims.

The accident occurred in May when an overpass and train carriage on the line plummeted onto a stream of cars in the southeast of the city.

An independent auditor found that missing bolts and poor welding contributed to the crash, findings confirmed in a separate investigation by the Mexico City attorney general's office.

Slim has said his construction firm, Grupo Carso, which helped build the section that collapsed, will repair the line at no cost to the government. Mexico's Grupo ICA and France's Alstom were a part of the consortium that built the full line.

(Reporting by Anthony Esposito and Miguel Angel Gutierrez; Editing by Sam Holmes and Leslie Adler)