The Swiss great, who goes on to face Russian 26th seed Mikhail Youzhny for a place in the semi-finals, had to come from two sets to love down to see off France’s Julien Benneteau in the last round.
“I was in a lot of pain,” said 30-year-old Federer. “The treatment and the pain-killers worked. I started to feel better as the match went on. But it was a shock for it to happen in the first set of a Grand Slam when you have to play five on grass.”