Updated

Stuttgart, Germany (SportsNetwork.com) - Maria Sharapova struggled early, but found her game in time to again capture the Porsche Tennis Grand Prix with a three-set victory over Ana Ivanovic.

Sharapova rallied for a 3-6, 6-4, 6-1 triumph on Sunday to claim her 30th career title and third straight in Stuttgart. She hadn't won a tournament since beating Li Na in last year's final at this event.

Ivanovic was trying for her 14th career title and third of 2014. She won in Auckland and Monterrey earlier this year. The victory in Mexico came earlier this month in her last event and Sunday's setback ended a nine-match winning streak.

The Serbian star won the first five games of the match and held a 6-3, 3-1 lead with a game point in hand, but Sharapova battled back by winning the next four games. After Ivanovic stemmed the momentum, the Russian closed out the second set and dominated in the third.

"For the first half of the match I thought it might not be my day today, but somehow I turned it around," said Sharapova. "I had quite a slow beginning to the year, but me and my team have been working hard to get in the position to win titles again, and I'm so happy to be able to do it in Stuttgart."

Sharapova improved to 8-2 lifetime against Ivanovic with seven straight wins. The two former world No. 1s also met in this event last year, with Sharapova claiming a three-set quarterfinal win.

"She's just a great player, and that's what happens when you play against great players in big matches like this," said Ivanovic. "You need to use your opportunities."

Ivanovic hasn't beaten Sharapova since the semifinals of the 2007 French Open.