Toyota will have to pay $4.2 billion to settle a federal investigation into allegations it misled customers about its ability to recall and fix faulty vehicles, the company said in a statement on Wednesday.

In March, the Federal Trade Commission accused Toyota of misleading consumers about its recall and warranty rights.

The Toyota subsidiary, Lexus, admitted in court documents that it had been providing misleading information about the recall and warranties to Toyota customers, including to people who bought a 2005 Toyota Camry.

The FTC said Toyota deceived customers by telling them the recall was imminent and that Toyota would fix the problem for free.

Toyota said it was “committed to working with the FTC and taking appropriate action to remedy any deficiencies.”

The settlement agreement also covers claims related to the recall of the 2013 Toyota Prius hybrid, which was recalled in the U.S. in March and later returned to Toyota dealerships after Toyota announced it would be replacing the vehicle.