DOHA, Qatar (AP)—Elena Dementieva of Russia rallied to beat Samantha Stosur 4-6, 6-4, 7-6 (4) Thursday for her first group-stage win at the WTA Championships.

Stosur earned a place in the semifinals despite the loss, having won her first two singles matches in the Maroon Group at the tournament. Dementieva has a 1-1 record after losing to No. 1-ranked Caroline Wozniacki in her first round-robin match.

Dementieva took a 3-1 lead in the second set before leveling the match with a blistering backhand down the line. Dementieva saved both break points she faced in the third, which went with serve until the tiebreaker.

The top two players from each round-robin group will go through to the semifinals on Saturday.

Dementieva still has a chance to advance if Wozniacki loses later Thursday against Francesca Schiavone. Wozniacki would be knocked out with a loss while Dementieva and Schiavone would play for the semifinal spot Friday.

Wozniacki with the win would ensure she keeps her top ranking for the year. Should she lose, it would give No. 2-ranked Vera Zvonareva a chance to replace her should she reach the finals. Zvonareva has won her first two matches in the White Group and is guaranteed a spot in the semifinals if Kim Clijsters beats Victoria Azarenka later Thursday.

Stosur, the French Open runner-up who upset Wozniacki Wednesday, started out strong, but just as she looked in control after the first set, things began to unravel. She committed more than 34 errors during the 2 hour and 42 minute match and only managed to win a third of her break points.

She ceded the momentum to the quicker Dementieva in the second set, who repeatedly rushed the net and managed to unnerve Stosur with a mix of successful drop shots, backhands and a powerful forehand. Dementieva also proved a fighter, repeatedly coming back in the final set, closing out the match with a strong serve that Stosur returned long.

“I was trying to improve my game coming in this match,” Dementieva said afterward. “Playing someone who had a great win last night, I was trying to fight for every point and it feels great to win 7-6 in the third.”