The fifth-seeded Bertens rallied from a 4-1 deficit and eventually swept the tie-break in a first set that went more than an hour, then after dropping the second set raced out to a 4-1 third set lead that she would not relinquish for a 76(0) 46 64 victory.
"It was not my best match today," Bertens said. "It was hard with all the wind, but I'm happy that I won.
"I tried to focus and fight for every point, which made the difference for me."
Bertens is now 10-0 at this tournament, including qualifying matches.
"I hope I can keep the streak going," Bertens said. "I have to play a lot more aggressive and hit the ball a little bit better and not make as many mistakes. It's difficult because of the altitude here, but I hope to play better tomorrow."
Next up for Bertens is Lourdes Domínguez Lino, who rallied from a 61 42 deficit in her 16 64 63 defeat of No.9 seed Tsvetana Pironkova. Domínguez Lino is into the quarterfinals for the third time at this event, though interestingly enough each time in a different city - Rabat in 2005, Fès in 2009 and Marrakech this year.
No.6 seed Francesca Schiavone had a surprisingly easy time with Simona Halep, winning eight straight games from 3-3 in the first set en route to a 63 62 win over the two-time runner-up at this tournament. Though her quarterfinal foe is the highest seed left, No.3 seed Alizé Cornet, she should be confident - in that she is 8-1 all-time against the Frenchwoman, with seven straight wins.
There was a doubles upset Thursday, as Olga Savchuk and Chanelle Scheepers downed No.1 seeds Daniela Hantuchova and Anabel Medina Garrigues. That means Scheepers and Mladenovic will square off twice in Marrakech, on Friday in the singles quarterfinals and on Saturday in the doubles semifinals, with Mladenovic alongside Petra Martic.