Paolo Guerrero teed up Peru's first World Cup goal in 36 years and then scored the second himself as Ricardo Gareca's side ended Australia's qualification hopes with a 2-0 victory.
Experienced striker Guerrero, who was only allowed to play in the tournament after the captains of Peru's World Cup opponents petitioned FIFA to temporarily lift his suspension, made the most of what may have been his final appearance for Los Incas, which finished with three points to add to the many plaudits it has won in Russia.
Its opener would have been worthy of winning any World Cup match, Andre Carrillo volleying Guerrero's weighted cross into the net to beckon forth a cavalcade of emotion from the hordes of Peru fans packing the stands in Sochi.
The talismanic Guerrero, 34, made his mark on the game's biggest stage with his 36th international goal early in the second half, extending his record as the country's all-time leading scorer.
Despite head coach Bert van Marwijk throwing on talented 19-year-old Daniel Arzani and veteran Tim Cahill to try and turn the game, Australia failed to muster a comeback as it finished bottom of Group C.
A win would not have been enough for the Socceroos anyway, as Denmark picked up the point it needed to accompany France through to the last 16.
Mile Jedinak was booked for a high boot on Christian Cueva after nine minutes of the first half and Australia looked the better side as it sought to stamp its authority on the game.
But it was rocked by a brilliantly taken Peru goal after 18 minutes when Guerrero broke into the penalty area, cut back onto his right foot and swung a deep cross for Carrillo to lash a volley through Jedinak's legs and into the bottom right corner of Mat Ryan’s net.
Peru then had to soak up some pressure as Tom Rogic beat three defenders on a jinking run into the penalty area after 26 minutes and saw his shot saved by Pedro Gallese, before Mathew Leckie was denied by a last-ditch Anderson Santamaria tackle as he slid in on goal.
The second half was five minutes old when Guerrero struck, hooking the ball into the far corner of the net beyond Ryan's left hand to leave Australia with a sizeable task ahead of them.
It set about it immediately as Jedinak's far-post header was denied by Gallese and Trent Sainsbury fired wide from close range, while substitute Cahill had a volleyed effort blocked in the penalty area.
As the minutes ticked away so too did Australia's hopes of a turnaround; Aziz Behich got in behind the Peru defence and had time and space to pick his spot but instead opted to send a cross beyond the unmarked Cahill.
Edison Flores almost added a third goal on the counter when he crashed a low drive onto the post from the edge of the box in the closing minutes, but the offside flag was raised and there was to be no final flourish for Peru.
- IND vs ENG, 4th Test: Bashir’s exploits, under Nostradamus Stokes, leave India in tatters
- Musheer Khan hits maiden double-century for Mumbai in Ranji Trophy quarterfinal against Baroda
- Ranji Trophy 2023-24 quarterfinals: Anubhav, Kartikeya hand Madhya Pradesh first-innings lead against Andhra on Day 2
- Ranji Trophy 2023-24 quarterfinals: Musheer Khan’s double-century puts Mumbai in strong position on Day 2
- Ranji Trophy 2023-24 quarterfinals: Indrajith steps up again as Tamil Nadu asserts control over Saurashtra on Day 2