The No3 seed turned around a poor first set performance to bounce back and overcome Berdych 3-6, 7-5, 7-5 in two hours and 37 minutes, to become the first winner on the blue clay of the Caja Magica in the Spanish capital.
“This is a tough tournament,” Federer said after the win. “It was tough to move on the clay but you just get on with it and try to make the best of the situation.”
Berdych began the final in vicious form as the No6 seed stepped on to the court with a purpose, holding his first service game to love before he broke Federer with a punishing down the line backhand return winner.
The 26-year-old Monaco-resident continued to pounce on the Federer second serve and returned every effort from the Swiss with interest as he almost broke again in the eighth game when he got his hands on two break points thanks to a slick down the line backhand passing shot. But Federer pulled out four huge serves on demand to hold and force Berdych to serve out the first set, which he did superbly with an ace.
Despite an overpowering opening set from the Czech, Berdych had only served at 42 per cent first serves, but his 14 winners and only two unforced errors were enough to show that he meant business.
Federer called for the trainer before the second set began but the 30-year-old did not seem to have much to worry about as he stormed to a 3-0 lead taking advantage of a dip in Berdych’s form.
The set saw some aggressive hitting from both sides with Berdych slowly beginning to find his first serve, and he almost broke Federer back in the fifth game but the Swiss again came up with massive serves when he needed them most to make it 4-1.
Berdych however kept up the pressure and he took his chance when Federer was serving for the set at 5-3, breaking the 16-time Major champion after some incredible defence that sent the Swiss way outside the court and capped it off with a ruthless down the line forehand winner.
The pair both held serve the following two games but Federer upped the ante in the 12th game and Berdych eventually crumbled under the pressure, handing over the set with a double fault.
One would think Federer would have used the momentum to his advantage in the deciding set but it was Berdych who almost broke in the first game with a signature backhand return winner – a shot he had relied on heavily throughout – but his effort was barely an inch wide and Federer managed to hold.
Federer continued to struggle on serve up until the seventh game, which was his first comfortable service game of the set, and he finally came up with the break the following game in a bizarre scenario where Berdych saved three straight break points with three aces only to double fault twice and give the Swiss maestro a 5-3 lead.
A fearless Berdych however broke back immediately in a rare incident where Federer failed to serve out the match. The moment of truth however came when Berdych was serving at 5-6, 0/15, when the world No7 missed an easy forehand, his ball clipping the net cord to go long.
Federer jumped on the chance and created three championship points, but a headstrong Berdych was not going down easily as he saved all three, perhaps trying to put behind him years of choking moments on court.
But another forehand unforced error gave the win to Federer who now ties Nadal for the most Masters 1000 title wins having clinched his 20th trophy.
American actor and singer Will Smith was on court for the trophy ceremony and in a peculiar end to the tournament, gave Federer a framed suit he wore during his film Men in Black III.
Meanwhile, Patrick McEnroe, brother of eight-time Grand Slam winner John, led the plaudits for Federer’s victory as he wrote on Twitter: “Federer back to #2. Amazing. Can he get back to #1? If yes, would be his greatest achievement. And there have been too many to count!!”