Renault's Sébastien Buemi claimed pole position for the Marrakesh ePrix in qualifying on Saturday.
He will be joined on the front row for the start of the race by DS Virgin's Sam Bird, after an eventful session in unusually chilly and overcast conditions for Morocco.
The outcome was a turnaround from earlier in the day, when Audi had dominated the two practice sessions. Lucas di Grassi claimed first blood in FP1 with a time of 1:20.310s, and his team mate Daniel Abt was quickest in a fog-hit FP2. He posted a time of 1:19.760s despite the conditions, with di Grassi 0.138s back.
Qualifying on the 12-turn, 1.86-mile circuit saw di Grassi apparently pick up where he had left off. He set the early pace, topping the first group by a tenth ahead of Dragon's José María López with a time of 1:20.314s. López is making his first start of the season this weekend after missing out in Hong Kong.
Buemi was fastest in the second group, but his time of 1:20.491s put him only third fastest overall. He was just 0.076s faster than DS Virgin's Alex Lynn, with NextEV NIO's Luca Filippi third in the group.
Mahindra's Felix Rosenqvist leapt to the top of the overall times after the third group with a lap of 1:20.115s. Current points leader Bird also did enough to get into the top five and provisionally into the superpole round. However the second-place man in the standings - Jean-Éric Vergne - missed out and will start the race from 13th.
There was bad news for Venturi's Edoardo Mortara, who ran wide into a run-off during his qualifying lap meaning he will start from last place.
Nick Heidfeld went into the barriers during his lap in the second Mahindra, causing a delay of several minutes in proceedings. Assuming the damage to his car can be repaired, he will start from 18th.
When the fourth group did finally get underway, Jaguar team mates Nelson Piquet Jr. and Mitch Evans completed scruffy laps that left them in seventh and ninth places overall respectively. A red flag was then shown after António Félix da Costa slammed into the barriers at high speed.
The heavily damaged Andretti was quickly craned away. Audi's Daniel Abt and NIO's Oliver Turvey were then allowed to go back out and complete their interrupted flying laps. Unfortunately the disruption meant both drivers missed out on battling for the superpole. Abt will start from eighth and Turvey tenth.
The final top five pole shootout proceeded without further accidents. Buemi set the early pace with a time of 1:20.355s, which was a quarter of a second faster than Bird's somewhat middling effort.
López came close to disaster with a wild slide on his run, and he only just managed to keep off the wall. The damage was limited to his lap time instead, putting him a second off Buemi's pace. Di Grassi was even slower after suffering a motor issue on his run, which left him limping back to the garage.
As the last man out on track, Rosenqvist threw everything into his run. He came perilously close to losing it into the wall but recovered enough to cross the line third fastest ahead of López and di Grassi.
Lynn will start from sixth place ahead of Piquet, Abt, Evans and Turvey, with Filippi only 11th.
Gallery: The beautiful wives and girlfriends of F1 drivers
Keep up to date with all the F1 news via Facebook and Twitter