Car company Toyota has agreed to settle a class action lawsuit involving premature frame rust on some of its trucks for up to $3.4 billion, which it expects to cover repairs to 1.5 million vehicles.

The suit was brought by owners of 2007-2008 Toyota Tundra and 2005-2010 Tacoma pickup trucks as well as 2005-2008 Sequoia SUVs who say the frame rust protection on the vehicles was not sufficient to prevent them from rusting, according to AutoWeek.

The frame replacements are expected to run about $15,000 each for a total of $3.375 billion, and the inspections will add $90 million to the total, lawyers for the truck owners say.

Toyota expects to inspect the frames of the three affected trucks for up to 12 years from the date of sale or lease and replace frames as needed. Toyota also will reimburse customers who paid for frame replacements before the suit was settled, AutoWeek said.

“We want our customers to have a great ownership experience, so we are pleased to resolve this litigation in a way that benefits them and demonstrates that we stand behind the quality and reliability of our vehicles,” Toyota said in a statement after the agreement was reached last week, AutoWeek reported.

Toyota earlier recalled 1995-2000 Tacomas and 2001-2003 Tundras for frame rust, but the company was able to collect $25 million from its supplier in that instance. Additionally, Tacomas from 2005-2011 were recalled two years ago for possible rust on leaf springs.

The truck rust settlement deal came last week after seven months of negotiations and 2.5 million evidence documents on the matter, USA Today said.