Antonio Felix Da Costa clinched his first pole position of the year after beating Edoardo Mortar in the final in Marrakesh.
Da Costa set 1.17.070 to beat Moartara by a tenth of a second to secure back-to-back poles in Marrakesh, with the last one coming in 2020.
Jean-Eric Vergne will line up in third place. He was knocked out in the semi-finals by his teammate Da Costa.
Vergne looked the more likely to qualify into the final as he was faster than his Portuguese teammate in sector two, however, a lock-up for Vergne going into Turn 10 allowed Da Costa to progress to the final.
Pascal Wehrelin will line up fourth for Porsche after he was knocked out in the Semi-finals by Mortara. The German driver missed out on a chance to challenge for pole in the final by two-tenths of a second.
Jake Dennis will start from fifth for Andretti. The British driver had a compromised start to the weekend, as he missed the entirety of FP1 with a powertrain issue.
Mitch Evans will start sixth for Jaguar ahead of Oliver Askew who clinched his first appearance in the knockout phase of qualifying.
The American driver was knocked out by Da Costa in the Quarter-Finals, but the Rookie is showing signs of progressing in the series.
Nick Cassidy will start eighth for Envision racing. The Kiwi driver nearly knocked Wehrelin out at the Quarter-Final stage, but he hit a kerb too hard at Turn 7, which cost him two-tenths of a second and allowed Wehrlein to qualify instead.
Championship leader Stoffel Vandoorne was not only a shock departure through the opening group of qualifying, but the Mercedes driver was slowest in the session – his car struggling with locking under braking throughout his final lap.
The Belgian was handed a marginal reprieve, however, when Andre Lotterer had all of his lap times having failed to set the mandatory time within the first six minutes of the session.
Lotterer began the session with a sensor issue and thus was late in leaving the pitlane. He missed the line by 0.04s on his first timed lap.
Mercedes’ difficult day continued in Group B as Nyck de Vries was shuffled out of the top four by Wehrlein, who snatched third late into the second 12-minute session to claim a place in the quarter-finals.
The damage to de Vries’ day was less pronounced, however, as the Dutchman starts ninth from di Grassi – who was also a group-stage casualty after Cassidy dumped him out of the top four late in the session.
Antonio Giovinazzi sustained a puncture at the start of the session and was unable to set a lap within the first six minutes, resigning him to a back-row start with Lotterer.