He held the position of National President of the National Action Party until 9 December 2017, when he resigned to run in the 2018 presidential election for the PAN party in political coalition. Anaya scored second behind Andrés Manuel López Obrador in the election results.