KEY BISCAYNE, Fla. (AP) -- For the final few games, the fellow frustrating Novak Djokovic from across the net wore a lavender shirt, a red sweatband, black shoes with lime trim and a blue cap.
Tommy Haas won ugly, becoming the oldest man to beat a No. 1-ranked player in 30 years.
Eight days shy of his 35th birthday, tour veteran Haas defeated three-time champion Novak Djokovic in the fourth round of the Sony Open, 6-2, 6-4. The upset Tuesday night snapped Djokovic's 14-match winning streak at Key Biscayne, where he won the tournament the past two years.
"This is crazy,'' Haas said. "Playing against someone like Novak and coming out on top at this time of my career, it's unbelievable.''
As for Haas' outfit: "Yeah, I'm pretty pathetic I think when it comes to color matching,'' he said. "Sometimes I look at myself in the mirror before I go out and I'm like, `Geez, what was I thinking?' I guess if I maybe had a clothing contract it would be different.''
The top-ranked Djokovic has lost two of his past four matches after winning 22 in a row, including the Australian Open for his sixth Grand Slam title.
"All the credit to Tommy,'' Djokovic said. "He played a great match and he was the better player, no question about it.''
Haas improved to 2-14 against No. 1-ranked players. His only other win came against Andre Agassi in 1999.
The oldest player in the top 50, Haas is making his 13th appearance at Key Biscayne and advanced the tournament's quarterfinals for the first time. His opponent Wednesday will be No. 11 Gilles Simon, who rallied past No. 7 Janko Tipsarevic, 5-7, 6-2, 6-2.
Sam Querrey lasted only 50 minutes in the fourth round and lost to Tomas Berdych, 6-1, 6-1. Querrey was playing his first tournament as the No. 1 American on the ATP Tour, and his elimination means that for the first time, the 28-year-old tournament will have no U.S. men in the quarterfinals.
The shutout is the latest sign of declining fortunes for American tennis.
"I guess you could say it's been somewhat of the norm the last couple of years,'' Querrey said. "It's not like we had guys in the quarters week in, week out.''
American results on the women's side have been better lately, thanks mostly to No. 1-ranked Serena Williams. The five-time Key Biscayne champion advanced to Thursday's semifinals and tied the women's record for career victories in the tournament by beating No. 5-seeded Li Na 6-3, 7-6 (5).
Williams' opponent in the semifinals Thursday will be defending champion Agnieszka Radwanska, who hit a desperation shot behind her back for a winner en route to a win over No. 30 Kirsten Flipkens, 4-6, 6-4, 6-2.
With temperatures in the 50s for the final match of the night, Djokovic appeared out of sorts from the start. During his second service game he became annoyed at fans shouting as he was about to serve.
"It's definitely the worst match I have played in a long time,'' Djokovic said. "I just didn't feel good on the court. Conditions were really much, much different from what I have played in previous matches. Balls didn't bounce at all. He has a quite flat shots. He used the variety really well. It was very cold, and I just didn't find a better solution to come back.''
Djokovic hit consecutive forehand errors to lose serve and fall behind 3-2, the start of a stretch where Haas won six consecutive games. The German hit three spectacular winners to break again for a 5-2 lead, and Djokovic double-faulted to lose serve once more in the opening game of the second set.
Djokovic broke for the only time to reach 3-all, but lost his serve again. Haas closed out the victory with a forehand winner, then shared a warm exchange at the net with a gracious Djokovic, who gave the crowd a wave as he left the court.
Haas didn't look his age from the start, and not just because he played with his cap on backward. He played patiently from the baseline, mixing the pace of his shots to win a succession of long rallies, and he repeatedly whacked winners when Djokovic tried to force the issue by coming forward.
"I'm just really happy and proud that tonight, against such a great player who has been dominating the sport the past couple of years, I really took advantage of the opportunities I got,'' Haas said. "I think I played extremely well.''
While Williams continues to dominate the WTA Tour, no American man has reached the past five Grand Slam quarterfinals. The outlook wasn't helped by the retirement of Andy Roddick, whose 2003 U.S. Open championship is the most recent major title by a U.S. male.
Querrey was playing his first tournament as the top American, and he managed his best showing in eight appearances at Key Biscayne, aided by a walkover in the third round.
His serve and forehand let him down against Berdych, however. The 6-foot-6 Querrey came into tournament second on the tour in aces this year, but he had only four against Berdych, and made only 39 percent of his first serves.
"Just one of those awful days,'' Querrey said. "The more you miss, the harder it gets to get the ball in. It just kept getting worse.''
No. 2 Andy Murray, the champion in 2009 and runner-up last year, beat No. 16 Andreas Seppi 6-2, 6-4. His opponent Wednesday will be No. 9 Marin Cilic, who defeated No. 6 Jo-Wilfried Tsonga 7-5, 7-6 (4).
No. 8 Richard Gasquet hit 17 aces, including three in the final tiebreaker, defeated No. 10 Nicolas Almagro 6-7 (3), 7-5, 7-6 (3). Gasquet will next face No. 4 Berdych.
No. 3 David Ferrer beat No. 13 Kei Nishikori 6-4, 6-2. Ferrer's opponent Wednesday will be unseeded Jurgen Melzer, who rallied past Albert Ramos, 2-6, 6-3, 6-3.