FEZ, Morocco (AP)—In a match featuring 18 breaks of serve, Dinara Safina edged fellow Russian Anastasia Pivovarova 6-4, 2-6, 6-4 Friday to reach the semifinals of the Grand Prix SAR.

Safina advanced to her first semifinal since the Cincinnati Open in August 2009.

Safina dropped serve nine times against Pivovarova in a topsy-turvy match stretching nearly 3 1/2 hours because of rain delays. Tied at 4-4 and 0-15 in the third set, Safina held serve to quickly wrap up the win after the players returned from a second rain delay.

Safina will play Alberta Brianti of Italy, who defeated Melanie Oudin of the United States 7-5, 5-7, 6-0.

The 24-year-old Safina missed three months last year because of a back injury. She retired during the first set of her quarterfinal in Andalucia this month with lower back pains.

Safina lost three of her service games in the second set, allowing Pivovarova to even the match after she held her own wobbly serve.

Simona Halep of Romania advanced to the semifinals with a 6-2, 6-1 win over Greta Arn of Hungary.

Halep, runner-up last year after coming through the qualifiers, reached her first semifinal of the year. She broke Arn’s serve six times in the match.

She will face Kirsten Flipkens of Belgium, who needed just 45 minutes to rout Nadia Lalami 6-0, 6-1.

Lalami held serve for 5-1 in the second set to avoid a whitewash, but it was a brief respite as Flipkens served out the match at love.