The Socceroos needed a win to stand any chance of reaching the last 16 for the first time since 2006, but they were undone by Carrillo’s 18th-minute strike and Guerrero’s goal early in the second half at the Fisht Stadium.
They go home without a win, joining Peru in being eliminated in Group C. However, for the South Americans there was only elation at ending their long wait for a victory in the competition.
Peru were already out before this game but they still had a huge travelling support, clad in the country’s distinctive white and red colours.
It was their first win in nine games at the tournament since they defeated Iran 4-1 in Argentina in 1978, and they will now hope to build on their performances in Russia after finally coming in from the international wilderness.
Whatever Australia did would ultimately have been in vain as they needed Denmark to lose against France to maintain any chance of making it out of Group C — the Danes played out a 0-0 draw in Moscow that allowed them to advance behind the French.
For the Socceroos it is a third consecutive World Cup in which they have failed to make it beyond the group stage. Bert van Marwijk’s team took just one point, against the Danes, in between defeats at the hands of France and then Peru.
The Dutchman did not bow to the pressure back home to give veteran forward Tim Cahill a start in the game, with Tomi Juric preferred to the 38-year-old up front in the absence of the injured Andrew Nabbout.
Cahill came on early in the second half but was unable to score the goal that would have seen him join an elite group of players — including Pele and Cristiano Ronaldo — to have found the net at four World Cups.
Australia were already two goals down, and heading for the exit, by the time Cahill was introduced.
Guerrero set up Watford winger Carrillo to volley in a fine goal from 16 yards, low into the far corner beyond the dive of Mathew Ryan, to become the first player to score for Peru at the World Cup since Guillermo La Rosa 36 years ago.
Australia played most of the football in the first half, however, with Aaron Mooy and Tom Rogic pulling the strings at times. Rogic, the languid Celtic playmaker, came closest to scoring, but after dribbling into the area his effort was saved by Pedro Gallese.
Yet their hopes of turning the tide in the second half were dealt a hammer blow five minutes after the break as Peru increased their advantage, Christian Cueva setting up Guerrero to hook a shot beyond Ryan.
After only being cleared to play in this World Cup at the last minute following a long legal battle against a doping ban, the moment was particularly sweet for Peru’s veteran captain.
The final score was a painful one for Australia, but it was hard to begrudge the Peruvians this win, especially their army of supporters who have lit up the tournament and will be missed as they now depart.