Lucas di Grassi claimed an incredible victory on the last corner of the Mexico City ePrix after Pascal Wehrlein ran out of energy just before the line.
Wehrlein had led from the start and had withstood incredible pressure throughout from Oliver Rowland, but he and both Nissan e.dams drivers appeared to misjudge when the checkered flag would fall.
It meant that they ran out of energy on the last lap, and while Rowland and Sebastien Buemi dropped out of the race, Wehrlein managed to eke out his energy until the very last corner.
Even had he managed to cross the line in first the Mahindra Racing driver would have had the victory taken off him however, after receiving a five second penalty for cutting the chicane in a desperate attempt to keep di Grassi behind him.
The penalty dropped the German to sixth place, and promoted Antonio Felix da Costa and Edorado Mortara into what had looked like an unlikely podium finish with just one lap to go.
It also boosted Jerome d’Ambrosio into fourth meaning that he retook the lead of the driver’s championship from Sam Bird, who was only able to climb to ninth after starting at the back of the grid after a technical issue in qualifying.
Andre Lotterer finished in fifth but it was another poor day for DS Techeetah after reigning champion Jean-Eric Vergne was hit twice and ended up down in thirteenth.
The first incident was a huge crash involving Nelson Piquet Jr, who careered into the back of Vergne and before collecting Alexander Sims as he helplessly slid across the track.
Vergne suffered a right-rear puncture from the incident, but was allowed to repair his car in the ensuing red flag period as the debris was cleared.
It wasn’t to end there for the Frenchman however, as he was later hit by Mitch Evans in the stadium section and spun round.
It left him down in thirteenth and unable to climb back into the points, meaning that he remains winless so far this season.
Sims too was badly affected by the earlier incident with Piquet as it relegated him down the order and he was unable to fight back on a track that once again proved difficult to pass on.
Evans seemingly avoided a penalty for the Vergne incident, and finished in seventh, just ahead of Felipe Massa, who faded after his strong qualifying performance.
And further down the order it was better news for HWA Racelab who got both cars to the finish for some much needed mileage, and they were split by Jose Maria Lopez who endured a torrid time with the stewards.
Having received a penalty for an energy infringement, Lopez then received further penalties for speeding in the pitlane and crossing the pitlane entrance as he seemed to have a lasts second change of heart.
Despite this litany of misdemeanours he still managed to beat his GEOX Dragon Racing team-mate Felipe Nasr, who finished last of the finishers on his debut.