Roger Federer secured his place in the ATP World Tour Finals in London next month as he overcame a nervy finish to beat Kevin Anderson at the Paris Masters.
Federer took an hour and 22 minutes to dispose of the giant South African 6-4 6-4 and move into round three in Paris, but it was not without some worrying moments in the closing stages.
Federer usually has his ticket to the season-ending event booked well in advance, but a difficult year meant he needed a strong display in Paris to secure his place among the top eight to play at the O2.
The former long-time World No 1 had few problems in the opening set, taking just one of the five break points he managed, while Anderson failed to generate even one.
A 12th straight year at the World Tour Finals seemed assured as Federer broke twice in the second set to lead 5-2, but as has been happening in recent times he started to struggle to kill the match off.
Anderson also raised his game by showing what a competitor he is on the court and he saw four break points saved before eventually making one stick and getting back into the match.
He had Federer in trouble again on the 17-time grand slam champion's next service game, when he got to 15-40, but Federer hit back in style this time to get back to deuce before clinching the match.
"It feels great, I'm so happy, it's been a tough year so this is a highlight because this was one of the big goals I set for myself this year so it's great to have made it," Federer told Sky Sports after his match.
"I'm a little disappointed about the end of the match again, at the end I'm clearly relieved because it could have gone 5-5.
"With the momentum he's serving to go 6-5 up, then a breaker probably and that's not something I'd want to be in after leading by two breaks, especially indoors.
"I don't know if I'm doing anything wrong or maybe it's just a time where my opponents play well when they need to. Overall I played solid and it's just such a minor detail that it's hard to say what it is."
With his place at The O2 now in the bag, Federer can focus on having a good week in Paris, which next sees him involved in a third round match against Phillip Kohlschreiber.