Australia 0-3 Spain
Reigning champions Spain avoided the ignominy of finishing their World Cup campaign bottom of Group B with victory over Australia in Curitiba.
Goals from David Villa, Fernando Torres and Juan Mata prevented La Roja from suffering a third successive loss for the first time since 1991.
Villa scored the opener when he flicked in Juanfran's cross, before Chelsea's Torres fired in the second.
Mata slid in the third from fellow substitute Cesc Fabregas's lofted pass.
The result means Spain finish third in the table with three points after one win and two defeats, while Australia finish bottom.
During the opening 30 minutes, Vicente del Bosque's Spain played like a side bewildered by the events of their opening two games.
Their play was characterised by misplaced passes, uncertainty in defence and a lack of bite in the final third.
But the reliable Villa, whose inclusion was one of seven changes, eased those concerns with a familiar flicked finish nine minutes before the break to cap a move that was typical of Spain in their glory years of 2008, 2010 and 2012.
Andres Iniesta threaded a pass down the right to overlapping full-back Juanfran. The Atletico Madrid played squared to Villa, whose clever finish outfoxed keeper Mat Ryan.
It was the 32-year-old's ninth goal in World Cups and his 59th in total in what will be his 97th and final game for Spain. Villa was later substituted, head bowed, and was consoled by his team-mates on the bench.
The European side improved tenfold after the break as Australia - with eight of their starting XI aged 26 and under - tired as they attempted to break up Spain's trademark tiki-taka exchanges.
After increasing the pressure, Del Bosque's men eventually doubled their lead in the 69th minute when Iniesta's ball split the defence and found Torres, who sidefooted in. That was the Chelsea forward's first World Cup goal since 2006.
The final goal of Spain's campaign came eight minutes from the end. This time it was Fabregas who was the provider.
The Chelsea midfielder, who had a falling out with Del Bosque during the build-up to the match, played a lovely lofted ball to Mata at the far post. The Manchester United player barely looked up before poking the ball under the body of Ryan.
Manchester City's David Silva, who was also a substitute, went close with a drilled shot in stoppage time as his side bid farewell to a disastrous Brazil 2014 campaign with a flourish.
- 6SpiranovicBooked at 88mins
- 15JedinakBooked at 90mins
- 9TaggartSubstituted forHalloranat 45'minutes
- 13BozanicSubstituted forBrescianoat 72'minutes
- 11OarSubstituted forTroisiat 61'minutes
- 14AlonsoSubstituted forSilvaat 83'minutes
- 15RamosBooked at 62mins
- 20CazorlaSubstituted forFábregasat 68'minutes
- 7VillaSubstituted forMataat 57'minutes
- 4Javi Martínez
- 12de Gea
- 19Diego Costa
- Nawaf Shukralla
- Shots on Target