Egypt were knocked out of the FIFA U17 World Cup after Samuel Martínez Valencia scored an 82nd-minute winner to give Colombia a 2-1 victory.

Adrián Mosquera put Colombia ahead in the sixth minute, heading in Miguel Agámez’s corner. Egypt brought on Daniel Tamer at half-time, and he headed in a loose ball in the 55th minute after Colombia failed to clear a cross.

Egypt briefly thought they had gone ahead, but VAR ruled the goal out for offside. Martínez Valencia, who came on in the 58th minute, won the ball in Egypt’s half and held off a defender before firing past Malek Amr. The goal stood after a review.

Hussein Abdel-Latif’s side finished second in Group A with six points, recovering from a 2-1 defeat to Greece to beat hosts Qatar 2-0 and Panama 4-1.

Colombia will face Japan in the last 16. They beat Japan 2-1 in the group stage before finishing second in Group L behind Serbia.