(CNN) -- Jo-Wilfried Tsonga ended Roger Federer's hopes of winning a record-equaling seventh Wimbledon title on Wednesday as the French 12th seed staged a stunning fightback to reach the semifinals.
Federer appeared to be cruising into the last four after winning the first two sets, but Tsonga inflicted the Swiss world No. 3's first defeat from that vantage point in 179 grand slam matches.
It was only the third time in the 29-year-old's glittering career that the 16-time grand slam champion had surrendered a two-set lead.
Tsonga, ranked 19th in the world, triumphed 3-6 6-7 (3-7) 6-4 6-4 6-4 on Centre Court, serving out to love as he earned a clash with second seed Novak Djokovic.
The Serbian, who beat Tsonga in the 2008 Australian Open final, ended the dream run of Australian 18-year-old Bernard Tomic.
Tsonga defeated Federer for just the second time in six meetings, their first on grass.
"It was amazing. I played unbelievable. It's never easy to come back against Roger. I'm so happy, it's crazy," the 26-year-old told reporters after reaching the semifinals at Wimbledon for the first time.
"He's the biggest champion in the sport. He has achieved so much and is the best player in the world. To be two sets down and come back was unbelievable. I served really well. Against Djokovic I will have to come out and do the same again."
Federer has now lost in the quarterfinals two years in a row, being beaten by eventual runner-up Tomas Berdych in 2010.
"Jo played great. Really from start to finish I don't remember seeing a break point after I broke him in the first game," Federer said.
"But I was close. I had all my chances. I'm actually pretty pleased with my performance today. It's kind of hard going out of the tournament that way, but unfortunately it does happen sometimes."
Tsonga's shock win also ended hopes of a rematch of the French Open semifinals from the start of this month, when Federer halted Djokovic's unbeaten start to 2011 before losing to Rafael Nadal in the final.
Djokovic is now only one win away from overtaking defending champion Nadal at the top of the rankings following his 6-2 3-6 6-3 7-5 victory in two hours and 41 minutes.
Tomic, who to come through qualifying rounds, was the youngest player to reach the quarterfinals since Boris Becker won the tournament for a second successive year in 1986.
He leveled the match in the second set and led 3-1 in the third, but Djokovic stormed back to take seven successive games as he clinched his 46th victory in 47 matches this season.
The 24-year-old will seek to reach his first Wimbledon final, having lost in the semis in 2007 and 2010.
Nadal extended his unbeaten run in south-west London to 19 matches as he set up a rematch of his French Open semifinal against Andy Murray by ending the run of American 10th seed Mardy Fish.
Fish eliminated Berdych in the previous round but was unable to go one step further, losing 6-3 6-3 5-7 6-4 to the Spaniard.
Nadal played within himself against the 29-year-old, having injured his foot against Juan Martin del Potro on Monday, but the 10-time grand slam champion was never seriously threatened by a man he had beaten on five previous occasions.
"My foot is not fine, but this is the Wimbledon quarterfinals so I had to play," Nadal said.
"We decided to sleep the zone of the foot to play the rest of the tournament. When you sleep the foot before the match, the anesthetic is for five hours, so you don't feel nothing.
"This is my last tournament for a month or six weeks. It is always a dream for me to play at Wimbledon. I had to do it to play in the quarterfinals, and I'm going to do it for the semifinals too."
Fourth-ranked Murray reached the semifinals for the third successive year, beating Spain's Feliciano Lopez 6-3 6-4 6-4.
The British player will on Friday have the chance to avenge his Paris defeat by Nadal, who also beat him at this stage at Wimbledon last year before winning his second grass-court grand slam.
"I think Feliciano was a little bit tired, but I served well for most of the match," Murray said.
"I'm playing well. I'm sure in the next round I'm going to get pushed even harder so I'll have to raise my game even more."
Lopez, a three-time quarterfinalist, played with his right leg strapped up following his win over Poland's Lukasz Kubot, when he came back from two sets down.