Updated

Six-time champion Roger Federer was upset in the Wimbledon quarterfinals for the second straight year Wednesday, squandering a two-set lead for the first time at a Grand Slam tournament and losing to Jo-Wilfried Tsonga 3-6, 6-7 (3), 6-4, 6-4, 6-4.

Federer barely looked challenged while winning the first two sets against the 12th-seeded Frenchman. But the Swiss star, who had been 178-0 in matches in which he had won the opening two sets at a major tournament, was broken one time in each of the last three sets.

"I was two sets down and I break. I did a good game of return and after that it was just amazing," Tsonga said. "I just played unbelievable, served unbelievable and now I'm here, I'm in semifinal and I can't believe it."

In the semifinals, Tsonga will face second-seeded Novak Djokovic, who defeated 18-year-old Australian qualifier Bernard Tomic 6-2, 3-6, 6-3, 7-5.

Federer was seeking to equal Pete Sampras' record of seven Wimbledon singles titles. He breezed through his opening four matches, losing only one set, and played his usual elegant game against Tsonga.

In the first set, Federer earned his one and only break point of the match in Tsonga's first service game, and converted it. He held the rest of the way, and then won the second set in the tiebreaker.

But Tsonga finally got his first break in the third set, and another in the fourth and another in the fifth.

Those were the Frenchman's only three breaks, and they were just enough to send Federer home early again.

"Everything was in, you know," said Tsonga, who had 63 winners and only 22 unforced errors. "It's never easy to play against Roger."

Later Wednesday, defending champion Rafael Nadal was playing Mardy Fish, while No. 4 Andy Murray was scheduled to take on Feliciano Lopez on Centre Court.

Federer has won six titles at the All England Club, including five in a row from 2003-07. He lost to Nadal in the 2008 final in what is considered by many to be one of the greatest matches ever, and then beat Andy Roddick for the championship a year later, winning 16-14 in the fifth set.

Last year, he lost to eventual runner-up Tomas Berdych in the quarterfinals.

"It's the biggest champion in my sport," Tsonga said. "He achieved a lot of things and he's just the best player in the world and I'm just so happy to win against him, especially on grass because it's maybe one of his favorite surface and I'm just so happy today."

On Court 1, Djokovic overcame a tough match against his protege, holding on to reach the semifinals for the third time in his career.

Djokovic has been practicing with Tomic on-and-off since the two became friends last year in Australia, but this was the first meeting between the two in a competitive match.

After Tomic put a forehand into the net on match point, the pair had a brief chat at the net. Then, with the crowd applauding, Djokovic did the same while motioning toward Tomic.

"It was a very even match. In the first set I felt I played quite well," said Djokovic, who finished the match with fewer winners than Tomic, 43-39. "Then I played one really bad service game and he got back into the match. And from that moment on, he was the better player."

At the start, Djokovic appeared to have little to worry about, rolling through the first set and on his way to a fifth straight major semifinal. But Tomic didn't quit, instead breaking Djokovic to take a 3-1 lead in the second set and eventually evening the match.

"He is such an unpredictable player. He's very young, and obviously, first quarterfinals of a Grand Slam for him means a lot," Djokovic said. "But he didn't have anything to lose, so he was hitting a lot of winners today."

Tomic again went up a break in the third, but that's when Djokovic got going. The two-time Grand Slam champion won five straight games to take the third set, and then won the first two games in the fourth. Although Tomic got back on serve at 2-2 and was two points from winning the set at 5-4, Djokovic soon broke to take a 6-5 lead and held for victory.

"It was really hard to predict where he's going to go. He was not making a lot of unforced errors from the baseline, and that made my life really difficult," Djokovic said. "I tried to change the pace, but he was better at that. We were playing cat and mouse, I think. But in the end, I'm just happy to get through."

Djokovic started the 2011 season by winning 41 straight matches, but that came to an end with a loss to Federer in the French Open semifinals. If the Serb reaches the final at the All England Club for the first time this year, he will guarantee himself the No. 1 ranking. He can also claim the top ranking if Nadal fails to defend his title.

Tomic was the youngest man to start in the men's draw this year, and is the youngest to reach the Wimbledon quarterfinals since Boris Becker defended his title in 1986.