A federal judge granted final approval Wednesday of a $1.075 billion agreement between Exxon Mobil Corp. and thousands of gasoline dealers who sued the company, settling a 14-year fight that went to the U.S. Supreme Court.

Exxon must deposit the total amount of money into a settlement fund within 35 days as part of U.S. District Court Judge Alan Gold’s final approval, said Miami attorney Eugene Stearns, who represented the dealers at trial and on appeal.