The Los Angeles Rams and the NFL have reached a settlement with the St. Louis region for $790 million. A lawsuit said the Rams violated NFL relocation rules and broke Missouri law in the way they left St. Louis for Los Angeles in 2016.

Tuesday, all parties met in a mediation session to try to reach an agreement before a January trial and after a series of court rulings favoring St. Louis lawyers.

St. Louis City, St. Louis County, and the Regional Convention and Sports Complex Authority will split the $790 million – after legal fees of course.

The region claimed millions of dollars in damages for trying to keep the team in Missouri.