Felix Rosenqvist jumped into the lead of the Formula E points by beating Sebastien Buemi in Marrakesh.
Rosenqvist was only third until just before the mid-race car swaps, but took advantage of a slowing Sam Bird to grab second and then caught and overtook Buemi in the second stint.
Bird faded in the second half of the race and only just beat Nelson Piquet Jr’s Jaguar to the final podium place.
Buemi led from pole in the early stages but never really looked like shaking off DS Virgin Racing driver Bird.
He was given a break when Bird slowed briefly on lap 16, one lap before the car swaps, which allowed Mahindra's Rosenqvist to jump into second.
A full-course yellow was deployed a lap later with the leaders - minus Jaguar’s Mitch Evans who had just stopped from sixth and thus plummeted down the order - still on track.
When the frontrunners finally stopped, Buemi rejoined with a 1.6-second lead, which Rosenqvist quickly halved before easing off slightly and dropping to about a second behind the Renault e.dams machine.
When Rosenqvist renewed his attack he did not hesitate, nailing Buemi with a fine move under braking for the tricky Turn 7 left-hander at the end of the long back straight with just a few laps remaining.
Rosenqvist eased clear to take a comfortable victory with Buemi second and erstwhile championship leader Bird a distant third as he struggled with a gearbox problem.
Piquet struggled in the opening stint and fell behind Jose Maria Lopez, but jumped the Dragon Racing replacement driver in the car swaps and flew in the second half of the race to ease clear of Jean-Eric Vergne.
Techeetah’s Vergne ended up a lonely fifth after a fine charge from 13th, with Lopez completing the top six on his series comeback and scoring Dragon’s first points in the process.
Maro Engel finished seventh on the road but got slapped with the time equivalent of a drive-through penalty post-race for causing a collision and dropped to 13th.
That promoted Nick Heidfeld to seventh, with Andretti’s debutant Tom Blomqvist scoring points in eighth and Nico Prost and Alex Lynn recovering from being punted into separate spins to complete the top 10.
Engel clattered Heidfeld late on while disputing seventh, but the Venturi driver appeared to be hit by teammate Edoardo Mortara, who was charging through from the back of the grid.
That meant Mortara failed to finish, joining Oliver Turvey – who only had one usable car after getting wheeled off the grid – Andre Lotterer and Lucas di Grassi in retirement.
Reigning champion di Grassi was part of the lead fight early on but slowed from fourth with what he called a “battery management system error” over the radio.
His Audi Sport Abt teammate Daniel Abt also failed to score points after receiving a drive-through penalty early on for punting Lynn into a spin.