Yvan Muller notched up his first World Touring Car Championship win of 2015 in race two in Marrakech, but was made to work for it by his team-mate Sebastien Loeb.
Muller led away from pole position but was quicker under pressure from his fellow Alsace driver Loeb, who had started third.
The four-time World Touring Car champion held onto the lead to beat the nine-time World Rally Champion by half a second.
Tom Coronel had started alongside Muller on the front row but had a race ended by first-lap for the second time in a day. He was hit from behind by Norbert Michelisz under braking for the first corner, sending him into Tiago Monteiro‘s Honda and then the wall.
Also on lap one, Rob Huff was hit by Mikhail Kozlovskiy at the final corner, putting both Lada drivers out on the spot.
Race one winner Jose Maria Lopez benefited from the frantic opening lap as he made his way from tenth to third to complete a podium lockout for the factory Citroen team.
Ma Qing Hua was on course for fourth until finding the barriers, promoting the Chevrolet duo of Tom Chilton and Hugo Valente. Moroccan favourite Mehdi Bennani lost out in contact with Valente and finished up ninth behind Michelisz, Gabriele Tarquini and Stefano D’Aste.
Valente, Michelisz and Bennani were all penalised later for misdemeanours, moving the Italian duo of Tarquini and D’Aste into the top six. James Thompson inherited seventh in the sole remaining Lada ahead of John Filippi, Valente and Ma.