Keothavong is working her way back towards the top 100 after injury
Anne Keothavong moved through to the third round of the Grand Prix De Sar La Princesse Lalla Meryem after opponent Carla Suarez Navarro retired injured.
The British number three was trailing 6-5 in a first set featuring two breaks from each player when the Spaniard had to quit after turning an ankle.
"It's never nice to get through to the next round when your opponent has injured themselves," said Keothavong.
Meanwhile compatriot Katie O'Brien lost 6-0 7-5 to Renata Voracova.
The 23-year-old British number two from Yorkshire failed to win a game in the first set but reacted well in a tight second set.
O'Brien, who learned on Tuesday she had earned a place in the main draw for the French Open, recovered from an early break and then broke herself to serve for the set but she failed to convert and went on to lose the set.
Keothavong now meets France's Alize Cornet and added: "She will be a tough test for me. She's not ranked as high as she once was but she's a solid clay-court player. I'm looking forward to it.
"Carla was in a lot of pain and I only hope for her sake that she won't be out for too long.
"Up until she fell over there had been some good tennis."
The Morocco tournament, in its 10th year on the WTA calendar, is the tour's only stop in Africa.