Some top players have shown signs of rust at the Rogers Cup, and Roger Federer was the latest.

The third-ranked Swiss star was upset by 13th-seeded Jo-Wilfried Tsonga 7-6 (3), 4-6, 6-1 in the third round Thursday night. Federer, who turned 30 on Monday, was playing for the first time since losing to Tsonga in the quarterfinals at Wimbledon.

Tsonga — who also beat Federer, then ranked No. 1, in the quarterfinals of the 2009 event — dominated the third set with strong serves and quick groundstrokes, and Federer found himself unable to match the Frenchman.

"(Tsonga) made amazing shots," Federer said. "I don't think I played bad, but I really didn't have a good start to the third set, which didn't help."

Top-ranked Novak Djokovic kept up his strong play this season with a 7-5, 6-3 victory over Marin Cilic of Croatia. The 24-year-old Serb is the last of the top four seeds to reach the quarterfinals of the Masters Series event.

In his second match since taking over the No. 1 ranking with a victory at Wimbledon four weeks ago, Djokovic broke the lanky Cilic's heavy serve twice in the second set to improve to 50-1 this year — including 26-0 on hard courts.

He beat another former top-10 player, Nikolay Davydenko, in straight sets in the second round.

"Both of the matches I've played here were against good players, but I didn't get any rhythm in either match," Djokovic said. "Conditions were quite different today.

"There was a lot of wind. It wasn't a beautiful match to play or watch, but I guess in the right moments I kept the ball in the court to make my opponent make unforced errors. I was just more patient and played well, so I guess that's the positive."

Djokovic, seeking his ninth tournament win of the season, will face fifth-seeded Frenchman Gael Monfils, who beat Viktor Troicki of Serbia, 3-6, 7-6 (0), 7-6 (5).

The tournament had already lost defending champion Andy Murray and second-seeded Rafael Nadal to upsets in the early rounds before losing Federer.

Tsonga will face Nicolas Almagro of Spain in the quarterfinals. Almagro came back after being broken in the first set to defeat 10th-seeded Richard Gasquet of France 7-6 (5), 6-3.

Ivan Dodig, the 41st-ranked Croat who beat Nadal, had little left a day later as he was beaten 6-1, 6-4 by unseeded Serb Janko Tipsarevic.

Tipsarevic will face seventh-seeded Tomas Berdych in the quarter-finals on Friday. He is 2-0 in his career against the Czech veteran. Berdych downed Ivo Karlovic 6-3, 7-6 (2).

Also, Stanislas Wawrinka ousted Kevin Anderson 6-4, 4-6, 6-4, and sixth-seeded American Mardy Fish beat Ernests Gulbis of Latvia, 4-6, 6-3, 6-4.

Djokovic said it is normal for top players to be a little off their games after the break most of them take between grass court play at Wimbledon and the hard court season leading up to the U.S. Open.

Upsets have also befallen top players at the women's Rogers Cup in Toronto, where Maria Sharapova and French Open champion Li Na were the latest to go down on Thursday.

"I can't talk for all players, but the fact is that for most of the top players who don't play for a few weeks it's normal to expect that the opening matches of the tournament will be tricky," Djokovic said. "You're still trying to find the rhythm, trying to get used to the conditions and getting into tournament mode.

"But it's normal to have those (breaks) in a year. You have to have them. We had seven months of consistent competition, week after week. The schedule is so demanding that even these couple of weeks off is like a dream come true. Each year, most of the top players don't play anything between Wimbledon and (the Rogers Cup)."

The 6-foot-5 Berdych evened his career mark against the 6-foot-10 Karlovic at 2-2, but it was their first meeting in three years.

"It's totally different than three years ago and I'm sure it's the same for him," Berdych said. "Today I was more focused and patient. I got a chance in the first set and made it and the same in the second during the tiebreak.

"(Karlovic) and John Isner are the ones who really make bomb serves. That's his main weapon and then he likes to come to the net where he plays well because he's tall."

It is the second year in a row and the third time overall that Berdych has reached the Rogers Cup quarters. He has never made the semifinals.