Six-time champion Roger Federer came within two points of crashing to his worst Wimbledon defeat in 10 years on Friday before battling from two sets down to beat French 29th seed Julien Benneteau.
Federer clinched an eighth career fightback from two sets in arrears to win 4-6, 6-7 (3/7), 6-2, 7-6 (8/6), 6-1 and will face unseeded Belgian Xavier Malisse for a place in the quarter-finals.
The Swiss star, who won the last of his record 16 Grand Slam titles at the 2010 Australian Open, was staring at his earliest defeat at the All England Club since a shock first round exit to Mario Ancic in 2002.
But after being two points away from joining Rafael Nadal on the Wimbledon scrapheap in the 12th game of the fourth set, Federer raced through the decider as Benneteau wilted and twice needed treatment by the trainer.
"It was a tight match and maybge I had a bit of luck on my side," said Federer, who had also come back from two sets to love down to beat Juan Martin del Potro at the French Open quarter-finals this year.
"It was tough and brutal. I fought until the end to stay alive."
Friday's thrilling third round tie was played out under the Centre Court roof which had also been closed for the final set of Nadal's stunning second round exit to Czech world 100 Lukas Rosol 24 hours earlier.
Benneteau, who has never won a title on the tour, had defeated Federer in their most recent meeting, indoors in Paris in 2009 on the last occasion they met.
And he stormed through the first two sets on Friday courtesy of a break in the 11th game of the opener and then recovering from a break down in the second to claim it on a fourth set point.
Federer, who only lost nine games in his first two rounds, swept the third set with Benneteau's poise shattered by a second awkward fall onto the humid Centre Court surface.
He then levelled the match with a nerve-shredding fourth set tie-break after Benneteau had twice been just two points from victory in the 12th game.
Twelve months ago, Federer had been beaten from two sets up to lose in five to Jo-Wilfried Tsonga in the quarter-finals.
Friday's final set was given extra spice with Benneteau defending a record of having won all four of his last five-setters.
But the Frenchman picked up a left leg injury and was unable to mount a serious challenge as Federer preserved his record of having got to the fourth round of every Grand Slam since the 2004 French Open.