Mexico will remain on the Formula 1 calendar for three more years after a deal was agreed to expand the schedule to a record 22 races next season.
The race will change its name to the Mexico City Grand Prix from 2020.
Mexico returned to the schedule in 2015 after 23 years but faced an uncertain future, with the government suggesting funds might be allocated elsewhere.
New races will take place in Vietnam and the Netherlands from 2020, with Germany set to drop off the calendar.
Mexico City mayor Claudia Sheinbaum said the three-year agreement was based on a new financing model without the use of public resources.