Peru recorded their first win at a World Cup finals since 1978 as they beat Australia in the last match of the tournament for both sides.
Australia needed to defeat already-eliminated Peru and hope France beat Denmark in order to reach the last 16, but the South Americans went ahead with a fine, low 15-yard volley from Andre Carrillo.
Excellent defending from Anderson Santamaria denied Mathew Leckie a close-range equaliser as Australia struggled to create clear-cut chances.
Peru captain Paolo Guerrero, only able to play in the tournament after tribunal overturned a 14-month drug ban, sealed the victory when he spun and shot into the far corner.
Christian Cueva also hit a post for Peru late on as they finished third in Group C above Australia, while France qualified as group winners after their goalless draw with Denmark.
Peru had played eight World Cup finals matches without a win since they beat Iran 4-1 on 11 June, 1978, and this victory was only the fifth in their history.
Peru were playing in their first world Cup tournament since 1982, although their qualification had been fortunate as they had lost 2-0 against Bolivia in qualifying, but that result was given as a 3-0 Peru win as the Bolivians fielded Paraguay-born Nelson Cabrera as a late substitute.
Nevertheless, more than 40,000 Peruvians travelled to Russia and they have been determined to enjoy every moment.
Once again their fans made for a terrific atmosphere in Sochi, even though 1-0 defeats to both Denmark and France in their opening two games meant they had no chance of progressing.
It only took 18 minutes for the South Americans to take the lead when Carrillo, who spent the 2017-18 season on loan at Watford from Benfica, connected perfectly with Guerrero's cross for their first goal of the competition.
Their second came just five minutes after the break when Peru's record goalscorer Guerrero doubled his side's lead.
The 34-year-old had been set to miss the World Cup having been given a 14-month ban after testing positive for cocaine, although Guerrero has always maintained his positive test in October 2017 came after drinking contaminated herbal tea.
His ban was overturned just before the start of the tournament after the captains of group rivals Australia, Denmark and France wrote to Fifa asking them to lift the ban.
It was a fully deserved result for Guerrero and his team to give his country's supporters the win they desired.