PARIS — Roger Federer was made to fight all the way by local favorite Jeremy Chardy before reaching the third round of the Paris Masters on Wednesday, while Andy Murray moved one match away from qualifying for the ATP Finals.

The 17-time Grand Slam champion completed a 7-6 (5), 6-7 (5), 6-4 victory at the Palais Omnisports to keep his challenge for the year-end No. 1 ranking well on track.

Federer could have sealed a quicker win but Chardy, who beat him on clay at the Rome Masters earlier this season, saved two match points at 5-4 in the second set before forcing a decider with a stunning crosscourt forehand winner.

“Chardy has made it hard for me in the past. I thought it could be tough, and it was,” said Federer, who is up against another Frenchman, Lucas Pouille, in the next round.

“As the match went longer, the better I actually started to play and created more opportunities.”

The 33-year-old Federer arrived in Paris undefeated in his past 12 matches on the back of consecutive titles in Shanghai and Basel, trailing top-ranked Novak Djokovic by 490 points.

With 2,500 points up for grabs between Paris and at the ATP Finals in London, Federer is looking to clinch the year-end top spot for a record-equaling sixth time.

He will also have a chance to earn points with Switzerland in the Davis Cup final against France next month.

FED CUP

Kvitova, Kerber to play in Fed Cup final: Wimbledon champion Petra Kvitova will lead the Czech Republic and Angelique Kerber will play for Germany in next week’s Fed Cup final.

After an early exit from the WTA Finals, Kvitova has a chance to win the Fed Cup title for the third time in four years while Germany is seeking its first triumph since 1992.

Kvitova is 3-2 against the 10th-ranked Kerber.

Captains Petr Pala of the Czech Republic and Barbara Rittner of Germany announced their four-player teams on Wednesday.

Andrea Petkovic and Sabine Lisicki are the other two German options to join Kerber in the singles, while Julia Goerges is the remaining player.

Karolina Pliskova, a 22-year-old rising star of Czech tennis, made the squad for the first time. Pliskova won the Generali Ladies last month for her second WTA title this year and is a career-high 24th in the rankings.

Big serving Lisicki defeated Pliskova 7-5, 6-3 in the final of the Hong Kong Open in September for her first WTA title in three years.

Lucie Safarova is also in contention for singles for the Czechs, while doubles specialist Lucie Hradecka has been selected for the Nov. 8-9 best-of-five series on an indoor hard court in Prague.

The Czechs, who beat Germany in their previous three encounters, won the Fed Cup in 2011 and ’12.

TOURNAMENT OF CHAMPIONS

Muguruza beats Makarova: In Sofia, Bulgaria, Garbine Muguruza’s perfect serve helped her to a surprise 6-2, 6-1 victory over top-seeded Ekaterina Makarova of Russia in the group stage at the season-ending WTA Tournament of Champions on Wednesday.

The WTA’s rising star from Spain, who replaced the injured Samantha Stosur, needed just 69 minutes to cruise past the Russian favorite.

“She played very aggressive and didn’t give me any chances,” an exhausted Makarova said.