Roger Federer returned to number two in the world with victory over Tomas Berdych in the Madrid Open final.
The Swiss battled to a 3-6 7-5 7-5 on the new new blue clay courts and moves above Rafael Nadal in the rankings.
"It was a tough tournament and a brutal draw," said Federer, who joins Nadal on 20 victories at the elite Masters Series level. "Tomas played very well.
"I'm sure we will see each other many more times and they will be quality matches like this one."
Before Madrid, Federer had not played for six weeks since losing to Andy Roddick in Miami.
The Czech player dominated the first set of Sunday's final with 14 winners and just two unforced errors, but Federer broke twice in the second and took it when Berdych double-faulted on set point.
Two more double faults from Berdych looked to have handed Federer a match-winning lead at 5-3, but the 16-times Grand Slam champion faltered when serving for the match.
It was a brief stay of execution for the sixth seed, however, as he fell 0-40 down in game 12 and, despite saving three championship points, finally succumbed with a forehand into the net.
The 30-year-old Federer has now won four tournaments in 2012 and, with world number one Novak Djokovic defending a huge number of ranking points in the coming months, the Swiss could potentially regain the number one spot with a Grand Slam victory.
Should he get back to the top of the rankings for the first time since May 2010, Federer would equal, and almost certainly go on to break, Pete Sampras's record of 286 weeks as number one.
"Back then I was just trying to stay world number one and I never really looked at Pete's record that much," said Federer, who received a framed Men In Black suit from actor Will Smith at the presentation ceremony in Madrid.
"I guess I could have chased it a few years ago, just really trying to beat that record. It's no secret for any player out there that you'd rather be number one than number two.
"But I look at the long term - maybe if I wasn't good enough to break that record then maybe I never will be."