Robin Soderling fought back from two sets down to beat former champion Lleyton Hewitt 6-7 (5-7) 3-6 7-5 6-4 6-4 in a gripping Centre Court contest.
Australian Hewitt, the men's champion nine years ago, was at his gutsy best early on as he surged ahead.
But Soderling hit back, taking the third and fourth sets to take their enthralling encounter to a decider.
Both players exchanged service breaks before Soderling made the decisive one in the 10th game to seal the win.
"It's not easy against someone like Lleyton and I showed I can play well against the good players on big courts and turn around matches like this," a delighted Soderling told BBC Sport.
He will play either Russia's Igor Andreev or Australian Bernard Tomic in the third round.
A string of poor results has seen former world number one Hewitt plummet to 130 in the world rankings, 125 places below his opponent.
But the 30-year-old rediscovered some of his best form on the court where he won his second Grand Slam title, fighting back from 3-1 down in the first-set tie-break to take a 1-0 match lead.
And a breath-taking full-length diving volley winner in the eighth game sealed a 5-3 break in the second set, delighting the capacity crowd on the way to a 2-0 lead.
But Soderling's trusted serve ensured Hewitt could not find the decisive break in the third before levelling the match after more than three hours to set up an enthralling decider.
"I was a little unlucky not to win the first set but he played well in the second," said Soderling, a two-time French Open finalist.
"But even two-sets down I knew I could win if I raised my game a little bit."
The 26-year-old broke his opponent's serve in the third game for a 2-1 lead, but Hewitt's determination ensured he levelled in the very next game with a second successive service break.
And a second service break at 5-4 ensured Soderling claimed a memorable win after three hours and 53 minutes on a covered Centre Court.
Hewitt, 30, said the match showed he could still compete at the highest level.
"I love competing. You're a long time retired and I hear that from a lot of great athletes. As long as my body is close to 100% I want to go out there and compete.
"I still feel like I can give these top guys as much trouble as anyone out there."