SHANGHAI, China — Top-ranked Roger Federer lost consecutive matches for the first time in 4 1-2 years, falling to No. 7 Fernando Gonzalez of Chile 4-6, 7-6 (1), 7-5 Monday at the Masters Cup.

The defending champion lost for the first time in 11 meetings against Gonzalez. It snapped Federer's 15-0 record in round-robin play at the season-ending tournament, which features the top eight men's singles players and doubles pairs.

"It was a tough loss," Federer said. "I thought I played pretty good. I wish I had an excuse."

Andy Roddick overcame a second-set lapse and beat fourth-seeded Nikolay Davydenko 6-3, 4-6, 6-2. Federer will likely have to beat Roddick and Davydenko to reach the semifinals.

Gonzalez said his losing streak against Federer didn't get him down.

"I have really a lot of motivation," he said. "After 10 times, it's my turn now. I think the key of the match was my serve and don't be scared to go for my shots. That was really important."

Federer has won three Grand Slam titles in 2007 and already has clinched the No. 1 ranking for the fourth straight year. But he has been vulnerable over the last month, falling twice to David Nalbandian, first in Madrid, then again in the third round at Paris. The ninth-ranked Nalbandian didn't qualify for the event.

The last time that Federer lost two matches in a row was in 2003 when he fell in the third round at Hamburg, then the first round at the French Open.

Federer wasn't in trouble until the second-set tiebreaker. Gonzalez, who had only won two sets in their previous meetings, ran up a 6-0 lead. Federer saved one set point before sending a forehand long to even the match.

Shouting and pumping his fist, Gonzalez had break points for the first time in consecutive games in the third set but couldn't convert. Federer squandered five break points of his own.

Federer looked stunned as Gonzalez whipped winner after winner, and the Chilean finally converted a break to pull ahead 6-5. Gonzalez double-faulted while serving for the match at 40-0, but Federer sent a forehand wide to end it.

"You can't do much when he drills it into the corners," Federer said of Gonzalez, who always has a dangerous forehand and was hitting his backhand better than usual. "It was ridiculous."

Roddick fended off four break points in the first game, mixing up his powerful serve and forehand with forays to the net. He broke Davydenko once to take the first set and again to lead p 4-3 in the second.

After appearing in control, the fifth-seeded Roddick then won only two points in the next three games as the Russian broke him twice and evened the match.

Roddick smashed his racket after missing a forehand wide on set point, then managed to pull himself together, running off five straight games to take a 5-1 lead in the third.

Did it help to break the racket, which he gave to fans afterward?

"For as many times as it's helped me, it's hurt me that many times also," Roddick said. "It's just part of my personality. I've always been pretty expressive and emotional on the court."

After Davydenko held, Roddick finished off the match by holding serve at love, then had to wait to celebrate as Davydenko challenged whether the final shot on the line was good. It was. Roddick won 16 of 18 points on his serve in the set.

Roddick, who will lead the U.S. team against Russia in the Davis Cup final at the end of the month, has been bothered by injuries that kept him out of tournaments in Madrid and Paris, sandwiched around a first-round loss in Lyon.

But he says he is healthy now, taking advantage of the time off to build up his leg muscles and work on his volleys.

Roddick's coach, Jimmy Connors, didn't attend the Masters Cup. Davis Cup coach Patrick McEnroe, in Shanghai to do television commentary, watched from the stands.

American flags dominated the national banners draped around 15,000-seat Qi Zhong Tennis Stadium, which was only about half-full. Two young Chinese women flashed a sign that said "Ace ace baby," and Roddick complied with nine for the match at speeds up to 140 mph.

Davydenko said he started nervous, then tired in the third set. With one of the heaviest schedules of any player, he has said he plans to cut back next year because he feels his body is breaking down.

Davydenko's fairly low profile, despite his ranking, has vanished since the ATP began investigating his loss to Martin Vassallo Arguello of Argentina at the Poland Open in August.

Betfair, an online gambling company, voided all bets on the match after unusually large amounts were wagered on the lowly ranked Argentine throughout the match, even after he lost the first set 6-1. Davydenko retired with an injury in the third set.

Since then, several players — none in the higher rankings — have reported being approached and offered money to fix matches.

Last month, Davydenko was fined $2,000 by the ATP for "lack of best effort" during a 1-6, 7-5, 6-1 loss to Marin Cilic at St. Petersburg.