Kevin Anderson had sealed qualification after Dominic Thiem defeated Kei Nishikori in an earlier match in Group Llyeton Hewitt, and only needed to return the favour for Thiem to qualify, but Federer had other ideas.
The great Swiss, who suffered a loss in the first round-robin match, turned on the burners to power past the South African 6-4, 6-3 and secure his place in the semifinals of the year-ending event for the 15th time in his career.
“I’m very happy, my first match was tough and I never got going, but with my back against the wall maybe it’s easier for me to play,” said Federer, who is chasing his 100th career singles title.
“Kevin’s had a great year, but it’s been a fun group and I’m very happy to be in the semis.”
Victory sees Roger Federer top his group with superior number of games won and could now avoid Novak Djokovic, who could also top his group with victory over Marin Cilic in Group Guga Kuerten today.
“These round-robin formats are not straightforward, we’re used to it being you lose, you leave, you don’t hang around,” Federer added.
“Maybe it was difficult for Kevin [Anderson] having already qualified, whereas with Thiem winning it was maybe easier for me.
“But I’m happy I’m still alive and hope I can play a good match the day after tomorrow.”