Antonio Felix da Costa claimed pole position for the Marrakesh ePrix following a brilliant Super Pole lap.
The DS Techeetah driver made it into the top six from Group 1 to qualify for the final shoot-out, and despite being third of the six drivers to go, did enough to clinch his second Formula E pole.
Group 1
There was drama right from the start in qualifying as disaster struck for championship leader Mitch Evans and Jaguar.
The Kiwi would miss the finish line before the checkered flag meaning he failed to set a time and will start last despite then completing what would have been the fastest lap of the group session.
Da Costa would set the initial benchmark from Alex Sims and Lucas di Grassi, Sam Bird and Stoffel Vandoorne completed the Group 1 order.
Group 2
Max Guenther would take over P1 from Costa with Andre Lotterer and Edoardo Mortaro shuffling the Portuguese down to fourth and at the time appearing in danger of not making the top six.
Nyck De Vries recovered from biffing the wall at Turn 10 to sneak into fifth as Oliver Rowland and reigning champion Jean-Eric Vergne slotted in seventh and eighth.
Group 3
Sebastien Buemi would be the only driver to enter the top six for Super Pole in sixth as Jerome D’Ambrosio just missed out in seventh.
After Evans’ disaster, Jaguar played it safe with teammate James Calado with the Briton ending up 10th as Robin Frijns also hits the wall at Turn 10 en route to 13th.
Pascal Wehrlein was 15th for Mahindra and Daniel Abt bottom of the times in 17th.
Group 4
Last but not least, the six drivers at the bottom of the championship made their bid to make Super Pole.
The results would be disappointing, however, with Brendon Hartley the best placed in 12th and Nico Mueller 17th.
Oliver Turvey, Neel Jani, Felipe Massa and Ma Qinghua would all bring up the rear, though of course, ahead of Evans, who failed to set a time.
That meant Guenther ended the four stages of qualifying fastest, just 0.02s ahead of Lotterer.
Mortara completed the top three with Da Costa making Super Pole from Group 1 in fourth.
De Vries and Buemi would complete the top six.
Super Pole
Buemi set the early benchmark at 1m17.8s but that would be beaten by De Vries in the Mercedes by two-tenths of a second.
Da Costa followed and upped the ante with an impressive 1m17.1 to beat the Dutchman by over four-tenths in the DS Techeetah.
Mortara could only manage third fastest in the Venturi with Lotterer going fastest of all in Sector 2 and Sector 3 but just falling under a tenth shy of Da Costa in second.
That just left Guenther to try and snatch pole but despite a brilliant middle sector, two errors in the final few turns saw the German drop to second by just 0.069s as less than a tenth covered the top three.
De Vries held onto fourth ahead of Mortara and Buemi rounded up the Super Pole order.
Full results from qualifying can be seen below: