Porsche has won the Liqui-Moly Bathurst 12 Hour for the first time, after an audacious move by Earl Bamber Motorsport's Matt Campbell at Forrest's Elbow.
The Australian youngster passed the Aston Martin of Jake Dennis with eight minutes remaining, and crossed the line first in the GT3-R he shared with Dirk Werner and Dennis Olsen.
The result was subject to a post-race investigation into a Campbell pass on Chaz Mostert into The Chase in the final hour, when they were contesting third place.
Stewards opted against taking any further action, though.
Campbell concluded the 12 Hours with a winning margin of 3.4413 seconds over Dennis, while GruppeM's Mercedes won a fraught fight for the final podium place.
In the closing laps, Raffaele Marciello kept Supercars stars Shane van Gisbergen and Mostert at bay, their Mercedes and BMWs taking fourth and fifth.
That top five was covered by just 8.9s and a rapid pace led to a new race record, the 312 completed laps surpassing the tally of 297 in 2016.
Mostert's BMW Team Schnitzer M6 led the way at the halfway mark, following a morning with trouble for some high-profile entries.
Strategies played out through the afternoon, particularly after the #911 and #912 Porsches – Campbell's entry the latter – stayed out during a caution period in the eighth hour.
That put them nearly half-a-stint out of sequence, and subsequent green flag running took that shuffling of the order into the final 75 minutes.
The top group gradually thinned out as entries including the #911 succumbed to mechanical problems, leaving seven cars on the lead lap.
EBM with the #912 Porsche had to start the final round of stops, Campbell doing so from the lead.
It opted to fit four fresh tyres, unlike the other contenders, but that combined with the required fuel drops did not play in its favour initially.
Dennis' Aston Martin took the lead from second, after seven pitstops across 23 minutes and 12 laps either side of the 11-hour mark.
The last of those stops, by the #108 Bentley came with a major setback for Andy Soucek, who stopped at pit exit and could not get going – for the second time in the race.
Having looked likely to emerge in third, Soucek fell to seventh and a minute from the lead by the time he was going again.
After that, Dennis led Marciello by 9s, with Mostert and Campbell (19s adrift) and van Gisbergen (27s) the top five with 45 minutes to go.
Those margins had been trimmed slightly, and Campbell had forced his way past Mostert at The Chase, when the Safety Car was summoned for a stricken KTM 15 minutes later.
That brought Soucek back into the equation and Triple Eight called van Gisbergen in for fresh tyres before the restart with 21 minutes remaining.
Dennis bolted at the green, while Campbell put his fresh tyres to good use to pass Marciello and give chase of the Aston.
Campbell caught and passed Dennis, squeezing past at Forrest's Elbow and going on to win.
R-Motorsport's Aston of Dennis, Matthieu Vaxiviere and Marvin Kirchhoefer took second, well clear of the frenetic scrap for third.
Marciello struggled with tyre wear in the closing stages, while van Gisbergen put his fresh rubber to good use after the restart.
It all came down to the line and Marciello – teamed with Maximilian Buhk and Maximilian Goetz – did just enough to deny van Gisbergen.
Seventh at the halfway mark after a mixed morning, Triple Eight's Mercedes stayed in the top 10 and on the lead lap throughout the afternoon.
Craig Lowndes and then Jamie Whincup completed their running, leaving van Gisbergen to jump in for the run home with just over two hours remaining.
Van Gisbergen chipped away at his deficit to the lead, 55s to the Campbell's Porsche and 40s to Dennis at the end of Hour 10.
In the end, a podium was out of reach by just 0.2042s, with Mostert's BMW – shared with Augusto Farfus and Martin Tomczuk – right behind.
The Matt Stone Racing Audi of Todd Hazelwood, David Russell and Roger Lago took second in Pro-Am, one spot ahead of Lee Holdsworth, Dean Fiore and Marc Cini, the entries 10th and 11th outright.
Class B Porsche honours were claimed by Dunlop Super2 Series driver Brenton Grove, with his father Steven and Ben Barker in 16th.
The HubAuto Corsa Ferrari with Nick Percat and Tim Slade in the line-up tangled with a lapped car two hours in, with Percat behind the wheel.
Repairs eventually got the car back out, with Percat, Slade and Nick Foster classified 18th and 33 laps down.
There were early exits for both the Erebus Motorsport Mercedes and the Audi featuring Garth Tander.
Erebus' effort with Scott Taylor Motorsport lost two laps during the first half with with David Reynolds, Luke Youlden and Yasser Shahin.
Shortly after the halfway mark, a rock punctured the radiator, ending its day.
Tander was running third during the fifth hour when he hit a slower Mercedes at The Cutting.
Repairs put the car down six laps, and it made one of those back before co-driver Frederic Vervisch crashed at McPhilamy Park seven-and-a-half hours in.