DS Techeetah's António Félix da Costa will start from pole position in today's ABB FIA Formula E Marrakesh e-Prix, ahead of BMW Andretti's Max Guenther and Porsche's Andre Lotterer.
However current championship leader Mitch Evans - who won the last race in Mexico - will start from the back of the grid, after the Jaguar failed to cross the line to start his flying lap before the chequered flag came out. It's a big blow for the New Zealander, who had been fastest in second practice.
Instead, the initial pace in the first group was set by da Costa. Having already led the field in first practice on Friday, he set a solid qualifying time of 1:17.640s which was almost two tenths faster than BMW Andretti's Alexander Sims and Audi's Lucas di Grassi.
However the disadvantage of being first out on track meant that of the five drivers to set a time - which also included Envison Racing's Sam Bird and Mercedes' Stoffel Vandoorne - only da Costa had done enough to make it into the superpole shootout.
As the track cleaned up, the second group saw a fastest time of 1:17.562s from Sims' team mate Guenther and two hundredths faster than Lotterer, followed by Edoardo Mortara in the Venturi. Nyck de Vries was fourth fastest for Mercedes, but hit the wall before completing his flying lap.
The honours in group three went to Sébastien Buemi, who set the benchmark time of 1:17.779s in the Nissan which was just ahead of Mahindra's Jérôme d'Ambrosio, while Evan's team mate James Calado was third fastest ahead of Envision Virgin's Robin Frijns who tapped the wall on his run.
The final group was dominated by the two Geox Dragon Penske cars with Brendon Hartley topping the times with a time of 1:17.944s ahead of team mate Nico Muller. However neither was fast enough to make it into the top six, meaning they would not take part in the superpole shootout.
Instead it was Buemi was the first to run, and set a time of 1:17.811s, but that was quickly bettered by de Vries whose car seemed none the worse for its earlier close encounter with the wall on its way to clocking a of 1:17.590s.
Pushing to the ragged edge, da Costa then sliced off another four tenths as he claimed provisional pole with a lap of 1:17.158s. That was too rich for Mortara who was only able to slot into third place between de Vries and Buemi.
Having claimed pole position last time out in Mexico, Lotterer ended up a tenth short of usurping da Costa from the top spot. As final man out, Guenther looked to have the measure of the Portuguese driver and set purple times in the first two sectors only to run wide at turn 11 which left him in second place in the final times.
Outside the top six, d'Ambrosio took seventh ahead of Sims and Oliver Rowland (Nissan) with Calado completing the top ten.
Having sat out Friday's practice session due to illness, Jean-Eric-Vergne was recovered enough to take part in qualifying. Despite coming bottom of group 2, his time was still fast enough to secure him 11th place on the grid, meaning that he will line up alongside Hartley.
Di Grassi and Frijns will pair up on the seventh row, followed by Bird and Pascal Wehrlein (Mahindra), then Muller and Vandoorne. Daniel Abt (Audi) will start from 19th ahead of Oliver Turvey (NIO) in 20th.
Neel Jani took a provisional 21st place but is under investigation for a technical infringement that might see him stripped of his qualifying time.
Former F1 driver Felipe Massa had a disappointing outing in the Venturi for 20th place on the grid, putting him ahead of a back row consisting of Ma Qinghua in the second NIO and the unfortunate Evans.