Sebastien Loeb ended his final year of full-time World Rally Championship competition by sealing his 76th career victory with an eighth successive Rally of Spain triumph.
Loeb was out of sorts in Friday morning's downpours on the gravel stages, but was making progress up the order even before hitting the asphalt on Saturday.
Nearly 40 seconds off the lead in fifth early on, by the rally's midway point Loeb's Citroen was leading by 20s.
That gap dwindled to just 7s at the finish as Jari-Matti Latvala put on a late charge.
In his Ford swansong, Latvala underlined his asphalt improvement with second place and some strong stage times, particularly on the final afternoon when he judged his tyre choices better than Loeb amid rain showers.
Latvala will surely ponder what he might have achieved with a stronger start - a poor performance in Friday's mud leaving him nearly a minute off the lead before the rally had barely begun.
Mads Ostberg and Ott Tanak had been the heroes when the weather was at its worst, fighting for the lead on Friday morning. While Tanak then dropped back, Ostberg pulled away to lead by nearly half a minute heading into Saturday.
A terrible Saturday ended the Adapta Ford driver's hopes of a first on-the-road win however. Ostberg lost the lead when he spun on leg two's second stage, then tumbled back to fifth amid handling issues later in the day.
Ostberg fought back on Sunday and closed to within 9.6s of Mikko Hirvonen's third position. But Latvala's second place and power stage win saw the Finn snatch third place in the championship away from Ostberg - a major blow for the Norwegian as he chases a works Citroen seat for 2013.
Tanak kept pushing for a podium finish until crashing out with just two stages to go.
He was the last major casualty of an incident-packed weekend.
Petter Solberg, Dani Sordo, Chris Atkinson, Thierry Neuville and Evgeny Novikov were among a host of drivers who crashed on day one. All rejoined under Rally 2, with Sordo the star as he took a sequence of stage wins once an engine problem was rectified. Atkinson was highest up the final leaderboard, salvaging seventh in Motorsport Italia's farewell as the factory Mini entrant.
Sordo's Prodrive Mini team-mate Jarkko Nikara had matched the Spaniard on Friday before a time-consuming puncture. He drove carefully thereafter and emerged with a surprise fifth place in his biggest WRC chance yet.
Hans Weijs - another returnee making his top-class debut - would have taken the place had he not rolled on the final morning.
A highly emotional Craig Breen followed up last year's WRC Academy win by clinching the 2012 Super 2000 title with sixth overall, beating rival PG Andersson. The result was a poignant end to the season in which Breen's original co-driver Gareth Roberts lost his life.
Benito Guerra came out on top of the six-way championship fight in the Production class's swansong. Jose Suarez won the Academy finale.
Leading finishers after SS18: Pos Driver Team/Car Time/Gap 1. Sebastien Loeb Citroen 4h14m29.1s 2. Jari-Matti Latvala Ford + 7.0s 3. Mikko Hirvonen Citroen + 1m46.8s 4. Mads Ostberg Adapta Ford + 1m56.4s 5. Jarkko Nikara Prodrive Mini + 16m07.9s 6. Craig Breen Kel-Tech Ford + 18m10.4s 7. Chris Atkinson Italia Mini + 19m14.7s 8. PG Andersson Proton + 20m16.1s 9. Dani Sordo Prodrive Mini + 25m40.6s 10. Evgeny Novikov Autotek Ford + 25m46.6s Other WRC finishers: 11. Petter Solberg Ford + 26m05.6s 12. Thierry Neuville Citroen Junior + 26m23.7s 13. Martin Prokop Autotek Ford + 26m49.4s 14. Abdulaziz Al-Kuwari Seashore Qatar Mini + 30m36.8s 16. Daniel Oliveira Stohl Ford + 31m22.2s 30. Paolo Nobre Italia Mini + 50m27.6s WRC retirements: Ott Tanak M-Sport Ford SS16 Hans Weijs Qatar Citroen SS15 John Powell M-Sport Ford SS8 Leading power stage results: 1. Jari-Matti Latvala Ford 15m43.5s 2. Dani Sordo Prodrive Mini + 2.4s 3. Sebastien Loeb Citroen + 10.7s 4. Mads Ostberg Adapta Ford + 17.1s 5. Petter Solberg Ford + 22.5s
Autosport has produced a standalone special magazine to celebrate our 70th birthday. All current print subscribers will receive a copy for free. To order your copy of the 196-page Autosport 70th Anniversary issue, please go to: autosport.com/autosport70th