Maria Sharapova won her first Madrid Open title with a battling 1-6 6-2 6-3 victory over Romanian Simona Halep.
The eighth-seeded Russian - who lost to Serena Williams in last year's final - started poorly and held her serve just once in the opening set.
But she upped her game in the second set and converted both her break points to level the match against the fourth seed.
Sharapova then pulled away in the deciding set with an early break to follow up her title in Stuttgart two weeks ago with a maiden title in Madrid.
The Russian has developed a formidable record on clay, a surface she used to hate, and seven of her most recent nine titles have now come on the dirt.
It certainly did not look like it would be a day to remember for Sharapova as Halep, the most improved player on the WTA Tour over the last year, raced into a 4-0 lead.
Sharapova called her coach Sven Groeneveld onto court for some advice after only three games but she could do nothing to stem the tide.
Halep was ranked 64th at the same time last year and needed a wild card to get into the main draw in Madrid before losing in the first round to Lourdes Dominguez Lino.
The following week she made the semi-finals in Rome as a qualifier and has not looked back since, winning seven titles and climbing to fifth in the rankings.
She looked totally at home in her first final at a WTA Premier Mandatory tournament but Sharapova can always be relied upon to fight to the last and she struck early in the second set.
The Russian, who has not lost to anyone other than Serena Williams on clay in almost three years, broke serve for the first time for 2-1 and went on to level the match.
Sharapova carried her momentum into the decider and opened up a 4-1 lead.
Halep won two games in a row to put the pressure on but Sharapova pulled away again to clinch victory after an hour and 57 minutes.