PARIS — Top-seeded Rafael Nadal advanced to the third round of the Paris Masters on Wednesday, and Roger Federer qualified for the ATP Finals for a 12th straight year.

PARIS — Top-seeded Rafael Nadal advanced to the third round of the Paris Masters on Wednesday, and Roger Federer qualified for the ATP Finals for a 12th straight year.

Nadal beat Marcel Granollers 7-5, 7-5 in an all-Spanish meeting, and Federer topped Kevin Anderson 6-4, 6-4.

"I didn't play well tonight," Nadal said. "Something that can happen after two weeks without playing and after a long time without playing on this kind of surface."

Nadal broke for a 6-5 lead in each set and clinched the victory when Granollers sent a forehand wide. The match stats pointed to a narrow margin of victory, with Nadal hitting 20 winners to 15 for Granollers and making 23 unforced errors compared to 22 for his opponent.

"The rhythm of my legs tonight was poor," Nadal said. "I'm slower than usual, and a lot of mistakes, easy mistakes."

Nadal was playing at the Paris Masters for the first time since 2009. He missed the tournament the past three years because of injuries or fatigue.

"The victories in days that you are not playing well have much more value than the victories on days that you play well," Nadal said.

The U.S. Open champion is seeking a record sixth Masters title in a single season. He will face last year's runner-up, Jerzy Janowicz of Poland, in the third round.

Nadal unseated Novak Djokovic atop the rankings by reaching the final of the China Open in October. He has a 30-2 record on hard courts this year.

Federer has had a rough season by his own high standards, losing in the second round at Wimbledon and in the fourth round at the U.S. Open to drop to No. 6 in the rankings.

"It's definitely somewhat of a highlight of the season for me after having a tough few months to still make it to the World Tour Finals," Federer said.

The fifth-seeded Federer took a 5-1 lead in the second set and held off a late charge.

Defending champion David Ferrer, Juan Martin del Potro and Stanislas Wawrinka also moved into the third round.

Ferrer overcame Lukas Rosol 6-0, 2-6, 6-3, and Del Potro beat Marin Cilic 6-4, 7-6 (3).