Mexico's head coach Miguel Herrera celebrates after Giovani dos Santos...

Mexico's head coach Miguel Herrera celebrates after Giovani dos Santos scored the opening goal during the World Cup round of 16 soccer match between the Netherlands and Mexico at the Arena Castelao in Fortaleza, Brazil, June 29, 2014. Credit: AP/Themba Hadebe

SAN JOSÉ, Costa Rica — Former Mexico coach Miguel Herrera has been hired as coach of the Costa Rica men's national team.

The 56-year-old Herrera, who led Mexico to the 2014 World Cup, was appointed late Tuesday by the Costa Rican soccer federation.

The veteran Mexican coach will fill the vacancy after Gustavo Alfaro resigned in August to coach Paraguay.

Costa Rica has advanced to the third round of the CONCACAF World Cup qualifiers alongside 11 other countries trying to secure three direct spots for the 2026 World Cup. The United States, Canada and Mexico are already qualified as host nations.

The next round of qualifying matches begins next September.

Herrera has coached six-first division teams in Mexico including America, where he won Apertura titles in 2013 and 2018.

Under Herrera, Mexico won a playoff against New Zealand in 2013 to qualify for the World Cup in Brazil, where the Mexicans were eliminated in the round of 16. He also helped Mexico win the 2015 Gold Cup and was fired soon after for allegedly fighting a TV journalist in a Philadelphia airport.

Mexico's head coach Miguel Herrera celebrates after Mexico's Andres Guardado...

Mexico's head coach Miguel Herrera celebrates after Mexico's Andres Guardado scored his side's second goal during the group A World Cup soccer match between Croatia and Mexico at the Arena Pernambuco in Recife, Brazil, June 23, 2014. Credit: AP/Petr David Josek