KEY BISCAYNE, Florida — An unusually inconsistent Roger Federer beat Florent Serra 7-6 (2), 7-6 (3) on Monday in the third round of the Sony Ericsson Open.

The top-ranked Federer lost serve three times, each time when he led. He committed 35 unforced errors to 32 for Serra.

But Federer won eight consecutive service points in the tiebreakers and closed out the victory with a service winner.

"All in all, I'm thrilled to be through," he said. "At the end of the day, that's what counts."

The crowd included Rafael Nadal, a potential opponent in Sunday's final.

"It has always been a lot of fun playing against him," Federer said. "I hope that day is going to come soon again."

The top-seeded woman, Svetlana Kuznetsova, was hampered by a right shoulder injury and lost to Marion Bartoli 6-3, 6-0 in the fourth round.

Kuznetsova, the 2006 champion, required treatment from a trainer three times during the match and won only eight points in the second set.

"I almost had stars in my eyes, it was so painful," Kuznetsova said. "I cannot return. Then I cannot serve."

The upset was nothing new for the 13th-seeded Bartoli, who has won seven of her past 11 matches against top-five players.

Bartoli advanced to the quarterfinals at Key Biscayne for the second time. She also reached the final eight as a qualifier in 2003.

Mardy Fish reached the fourth round with his second consecutive win over a seeded opponent, beating No. 29 Feliciano Lopez 7-5, 6-3. Fish upset defending champion Andy Murray in the second round.

Federer's fourth-round opponent will be No. 16 Tomas Berdych, who beat Horacio Zeballos 6-4, 7-5.

Federer's 7-6, 7-6 win was his first since October 2008. He played only four tiebreakers in his 14 previous matches this year, going 2-2.

"It's nice having won two breakers," he said. "That doesn't happen every match you play."

The Key Biscayne champion in 2005-06, Federer has won 36 matches in the tournament, third behind Andre Agassi and Pete Sampras. (AP)