The Autodromo Hermanos Rodriguez will stay on the F1 calendar in 2020, it has been confirmed.
On Wednesday the Mexico City mayor Claudia Sheinbaum revealed that "Formula 1 is staying in Mexico City" and the "FIA president [Jean Todt] is going to be here tomorrow to sign it".
The circuit reappeared on the F1 calendar in 2015 after a 23-year hiatus and has seen Lewis Hamilton clinch his last two world championships.
The Mexican Grand Prix has drawn in large crowds in recent years, but after its funding was pulled earlier this year, doubt lingered over the future of the event beyond 2019.
However, the deal has now been settled, and will stay on the F1 calendar until at least the end of the 2022 season.
“We are pleased to have renewed our partnership with Mexico City, which will now host the Formula 1 Mexican Grand Prix until at least 2022,” said F1 CEO Chase Carey.
“Ever since it returned to the championship calendar in 2015, this event has always proved to be amazingly popular with the public and fans, not just in Mexico, but also around the world.
“Proof of this is the fact that the race promoter has won the FIA award for the best event no fewer than four years in a row and, in those four years, over 1.3 million spectators have attended the Grand Prix.
“The Grand Prix has also been an important economic driver for the city, reinforcing its credentials as a centre for tourism.
“I would like to thank the Mayor, Claudia Pardo and the entire government of Mexico City for all their efforts in ensuring that Formula 1 continues in Mexico and I look forward to seeing another big crowd of fans at the Autodromo Hermanos Rodriguez from 25 to 27 October for the Formula 1 Gran Premio de Mexico 2019.”