Roger Federer and Rafael Nadal attracted what organisers said was a world record crowd for a tennis match when they played an exhibition event in the Cape Town Stadium on Friday.
The organisers said an audited attendance of 51,954 beat the 42,517 who watched Federer play Alexander Zverev of Germany in Mexico City last November.
They also announced that the 'Match in Africa' raised $3.5-million for the Roger Federer Foundation, which supports educational and athletic programmes for children in Africa.
Federer, who was accompanied by his South African mother, Lynette, said his first appearance in South Africa was a special occasion.
"The first time here in Cape Town, in South Africa, means so much more than just tennis," he said.
Federer won 6-4 3-6 6-3 in a match in which the players had to contend with cool, windy conditions in the stadium that was built for the 2010 football World Cup.
"It's an amazing crowd, an amazing stadium," said Nadal, who was making his first appearance in South Africa since playing in the country as a junior.
Federer and Nadal played an exhibition doubles match with billionaire Bill Gates and talk show host Trevor Noah, a South African, while a ceremonial coin toss was performed by World Cup-winning Springbok rugby captain Siya Kolisi, who presented Federer with a Springbok jersey.
The match is the sixth edition of the event organised by the Roger Federer Foundation and is the first to take place in Africa.
"There's so much anticipation that goes into it that the match itself almost gets forgotten," said Federer before the match.
He said he spent childhood holidays in South Africa.
"The time spent here as a kid was amazing," Federer said. "You would go on the road and you never come back for some reason because you've gotta chase that little tennis ball and you've gotta chase your dreams."
Tens of thousands of fans showed up early and were ecstatic when Nadal and Federer hit practice balls into the stands.
One fan said she brought a wedding ring for Federer to propose to her. "I want to marry Roger," she shouted.
Earlier in the afternoon, Federer and Nadal played tennis with children from townships in Hout Bay.
The children are part of an afterschool activity program with Zip Zap Circus which develops gross and fine motor skills.