Mahindra driver Felix Rosenqvist has won the Marrakesh Formula E Grand Prix while Kiwi Mitch Evans finished 13th.
The New Zealander's race was ruined by a decision by officials to call a full course yellow just as he and a couple of other drivers entered for their mid-race pit stop. That allowed the rest of the field to complete their stops under yellow while Evans and co toured around the race course in a compulsory crawl.
Evans had been in the top five before the pit stop having started from ninth. But he bent his steering through early race contact and also had a couple of laps where his car used more energy than planned and he had to pit a lap earlier than he wanted.
That allowed the bad luck to come into play.
Andre Lotterer's Techeetah had stopped off the racing line and had officials left local yellows in place for another 30 seconds or so there wouldn't have been any disadvantage for any driver. Instead they cost Evans championship points.
"The race was OK," Evans said. "We had a couple of laps where we were high in consumption and we are not sure why.
"Our strategy was to go a lap longer like everyone else but we had to pit a lap earlier than expected. Nelson had a great race, so I'm pleased for him and the team.
"We will look at all the data from this weekend and hopefully in Santiago we will be fighting for the points again."
Season two champion Sebastian Buemi led the majority of the race having started from pole before Rosenqvist made a late pass to steal victory.
Virgin Racing's Sam Bird took third place.
Rosenqvist took the championship lead with his win. It marked a role-reversal from a year ago where the Swede found himself being over-taken late.
"Last year was the point where we learnt what we needed to do to and this year we did it," said a delighted Rosenqvist.
Evans' Panasonic Jaguar Racing teammate Nelson Piquet Jr finished fourth and also recorded the fastest lap of the race in the process.
Andretti Autosport driver Tom Blomqvist scored an impressive ninth in his Formula E debut. The son of World Rally Champion Stiq Blomqvist spent much of his childhood living in New Zealand although he competes under a British flag.
Reigning series champion Lucas di Grassi failed to finish after a problem early in the race. It continues a horrible start to his title defense having failed to score a point through the first three races of the season.
The next stop on the calendar is Santiago, Chile in February.