LIMA, Peru (AP) — Argentinian Ricardo Gareca has agreed to a three-year contract extension to coach Peru in the South American qualifiers for the 2022 World Cup in Qatar.

Gareca took Peru to its first World Cup in 36 years in Russia, but failed to advance to the knockout stage. The team lost to France and Denmark and beat Australia.

The coach said at a press conference on Wednesday that his contract could be extended until the end of the tournament in Qatar if Peru qualifies again.

The 60-year-old will become Peru's national team longest-serving coach. He joined in 2015.

Peru has three confirmed friendlies this year. They will be against Holland and Germany in September and Chile in October.

The team's next big appointment is in next year's Copa America in Brazil.