Farfán left the club as his contract expired. Alianza Lima On 22 March 2021, Farfán signed with and returned to Alianza Lima. Retirement On 16 December 2022, Farfán announced his retirement at the age of 38. International career Farfán is an important player for the Peru national football team. Since making his debut for the side in February 2003, he has gained 95 caps and is second on the nation's career goalscoring list with 27 goals. Farfán ended the South American 2006 World Cup qualifiers as the second top scorer, with seven goals. He was suspended for 18 months from representing the national football team of Peru. But on 3 July 2008, after an investigation and a review of the facts, the suspension was changed to three months (from the date of appeal in April 2008) and $10,000. Farfan scored the winning goal in the World Cup qualifier at home to Chile on 23 March 2013. He was a member of the Peru national football team that finished in third place at the 2015 Copa América. Farfán has been a key performer for Peru during the 2018 World Cup qualifiers where he scored 3 goals. He scored 2 goals in a 3–4 home loss to Chile and the winner in a 1–0 home win over Paraguay. He scored one of two goals in a 2–0 home win against New Zealand that led Peru qualify to the 2018 FIFA World Cup after a 36-year absence. In June 2018 he was named in Peru's final 23-man squad for the 2018 FIFA World Cup in Russia. He started in their first group game against Denmark, which resulted in a 0–1 loss. Farfán started as a substitute in their second group game against France, coming on in the 46th minute to replace Yoshimar Yotún. His side were eliminated from the competition after another 0–1 loss. He missed their final group game against Australia as he was rushed to hospital after a suffering a concussion in training. Peru won their final game 2–0. In Peru's second game of the 2019 Copa América, Farfán scored a goal in Peru's 3-1 victory over Bolivia. Farfán suffered an injury to his left knee prior to Peru's last-eight clash against Uruguay, ruling him out of the rest of the tournament. The Peruvian Football Federation (FPF) confirmed the injury, with Farfán expected to be sidelined for 6 to 9 months.