Jerome d'Ambrosio powered to victory at the Marrakesh E-Prix for Mahindra Racing, ending a winless streak of 30 races in a thrilling fight in Morocco.
Performing his sole qualifying run in the first group of qualifiers, d'Ambrosio missed out on a spot in the Super Pole shootout, lining up in 10th on the grid while Sam Bird claimed pole position from Jean-Eric Vergne for Envision Virgin Racing.
Getting a strong start from pole position, Bird maintained his lead into Turn 1 for the 45-minute+1 lap affair, holding off an ambitious attack from Vergne, who launched his DS Techeetah car up the inside of the Briton into the left-hand hairpin, spinning as a result of contact.
Vergne's spin in Turn 1 resulted in an immediate shake-up of the grid, with drivers taking evasive action to avoid the stationary gold-emblazoned machine. This saw d'Ambrosio make his way through the grid from the outset, punching his M5Electro into fifth position.
While Bird maintained his lead following his Turn 1 contact, the pack began to bunch up, with Antonio Felix da Costa overtaking Alexander Sims to move into second place after starting in sixth as a result of a post-qualifying penalty.
Lining up a move on Bird, da Costa snatched the lead from the British racer in Turn 4 with 30 minutes of racing remaining while Sims quickly followed through to complete a BMW i Andretti Motorsport 1-2 out on track.
After dropping to third, Bird quickly fell through the field, falling behind team-mate Robin Frijns while d'Ambrosio snatched fourth from the driver with 22 minutes left on the clock. This later became third for the Belgian, with d'Ambrosio clearing Frijns one lap later.
With the top six drivers out on track reserving their two possible uses of Attack Mode for as long as possible, Lucas di Grassi was the first in the group to trigger the power boost device while both BMW drivers in front followed the Brazilian's example.
With both da Costa and Sims receiving a 25kW power increase for four minutes, the pair checked out ahead of the rest of the field, making a 1-2 finish appear to be probable for BMW.
Punching in faster laps than da Costa, the second-placed Sims began to close in on his Portuguese team-mate while the clock continued to tick down to zero, second by second.
Spying an opportunity for a potential maiden win in only his second race in Formula E, Sims launched an attack on da Costa into Turn 7, only for the latter to defend his position on the inside before locking up, pushing Sims to the outside of the track before crashing his white, blue and black BMW machine into the barriers.
With Sims needing to return onto the racing surface and with da Costa out, it was d'Ambrosio who would see the benefit, taking the lead before the deployment of the safety car.
With the clock continuing to tick down and with da Costa's stricken BMW still buried into the inside barrier of Turn 7, a race restart was looking increasingly unlikely, however, when the car was cleared up, it was announced that the racing action would once again resume for a one-lap sprint to the chequered flag.
Amidst the commotion at Turn 7, it was Envision Virgin Racing who saw the benefit, with both Frijns and Bird jumping into second and third place while Sims rejoined in fourth.
Priming his final use of Attack Mode, Sims was the only driver inside the top 10 able to use the power boost, desperate to clear Bird to return onto the podium while Frijns darted left and right, searching for a route around d'Ambrosio.
Making his Mahindra M5Electro as wide as possible, d'Ambrosio was able to hold off every threat that Frijns presented to take victory when the chequered flag waved after what emerged as 31 laps of running.
Frijns settled for second place to secure his second podium in Formula E while Bird held off a hard-charging Sims to stand on the final step of the podium – a result that marked Virgin Racing's first double podium in the all-electric single seater series' short history.
Sims was BMW's sole finisher, taking fourth place to secure his first points finish in Formula E while first lap spinner Vergne battled his way back through the field to front a 5-6 finish for DS Techeetah, with Andre Lotterer following the Frenchman across the line.
Di Grassi finished in seventh place for Audi Sport Abt Schaeffler after starting in 11th while Sebastien Buemi followed his long-term rival to the chequered flag in eighth. Mitch Evans was ninth for Jaguar Racing while Daniel Abt completed the top 10.
Jose Maria Lopez narrowly missed out on a top 10 finish, fronting an 11-12 finish for GEOX Dragon while Edoardo Mortara was 13th for Venturi Formula E.
Inaugural Formula E champion Nelson Piquet Jr took 14th in the second Jaguar I-TYPE 3 and was followed by Oliver Rowland, Oliver Turvey, Tom Dillmann and Felipe Massa who was the final classified finisher.
Joining da Costa in retirement was Pascal Wehrlein, who sustained damage at Turn 1 after being struck by di Grassi, while both HWA Racelab cars failed to see the chequered flag, with Stoffel Vandoorne and Gary Paffett colliding on the opening tour of the race.
Formula E will return on January 26 for the Santiago E-Prix while running at Marrakesh will continue on January 13 for the series' second of three in-season test sessions.