By Phil Harlow BBC Sport at Wimbledon |

 Federer did not have things all his own way against Mahut |
Defending champion Roger Federer came through his most difficult test so far at this year's Wimbledon to earn a 6-3 7-6 (7-2) 6-4 win over Nicolas Mahut. After two relatively straightforward victories, Federer found life more difficult against the serve-and-volley tactics of the world number 77 Mahut.
Federer broke in the sixth game and held on to take the opener.
Mahut forced a tie-break in the second but lost his way and the set, and Federer broke back to win the third.
Federer lost serve for the first time in this year's tournament in the ninth game of the final set as former junior Wimbledon champion Mahut gained some reward for a courageous performance.
But the world number one swiftly restored pride by breaking back in the next game to book his passage into the fourth round. Federer has looked in imperious form on his quest for his fourth straight Wimbledon title.
And though the world number one was in charge of this encounter on Court One for the most part, he had to endure some uncomfortable moments as an aggressive Mahut took the game to him.
Mahut saved a break point in his very first service game, setting the tone for a defiant performance, and held his second to love.
 | I didn't expect such a big second serve from Mahut |
But in the sixth game, Federer suddenly found an extra gear and secured the break - albeit with the benefit of a net cord - he needed.
The rest of the set went with serve to give Federer the lead.
A tremendous second-set display from Mahut, in which he saved numerous break points, forced a tie-break in the next, but the 20-year-old crumbled as Federer took it 7-2.
Nevertheless, Mahut continued to battle hard in the third and deservedly broke Federer's serve at 5-3 down to keep the match alive.
It was only a brief stay of execution though, as Federer again upped his tempo to break back and seal the match.
Federer admitted he was slightly surprised by the quality of Mahut's service game after being made to work hard for his win.
"This was a tricky match, very difficult," said Federer.
"I expected a big serve but I didn't expect such a big second serve. I enjoyed the challenge.
"I realised early on that I wanted to be the dominant player from the baseline. He had to take all the chances at the net."
Federer now plays 13th seed Tomas Berdych, who beat him at the 2004 Olympics, after the Czech player's marathon win over 19th seed Tommy Haas.
Berdych finally came through after three hours, 35 minutes to win 2-6 7-5 7-6 (9-7) 4-6 8-6 - his second consecutive five-set match.
It is the second year in a row he has reached this stage at Wimbledon and he made round four at this year's French Open.