Cape Town - Roger Federer defeated Rafael Nadal in their Match in Africa exhibition at Cape Town Stadium on Friday evening.
Federer won the three-set contest 6-4, 3-6, 6-3.
In windy conditions, Federer broke Nadal in the very first game of the match and from there it went on serve for the remainder of the set.
The Swiss ace looked comfortable on serve until the eighth game when he had to fend off a break point before holding for a 5-3 lead.
Nadal held serve for 5-4 but Federer comfortably served out the set to love in front of a boisterous crowd.
Nadal broke early in the second set for a 2-0 advantage, but Federer broke back straight away.
However, the Swiss could not consolidate the break and allowed the Spaniard to break again for a 3-1 lead in the next game.
Nadal would not relinquish the advantage again and took the set 6-3.
But Federer regrouped and broke at the start of the third set and from there he roared to the finish line.
Federer had to fend off a break point while serving for the match, but held his nerve and sealed the contest in style with a superb drop volley at the net.
In the end, Federer's serve made the difference - he served nine aces compared to Nadal's solitary ace.
The match started with the crowd in high spirits, with Springbok World Cup-winning captain Siya Kolisi making a surprise entrance on court to do the pre-game coin toss.
Kolisi handed Federer a Springbok jersey with the Swiss star's name embroidered on the back, with the 20-time Grand Slam winner wearing it during his warm-up.
Earlier, in the doubles curtain raiser, Federer teamed up with Microsoft co-founder, philanthropist and rand trillionaire, Bill Gates, to defeat Nadal and South African comedian Trevor Noah 6-3 in a one-set shootout.
After the match, organisers confirmed the official attendance figure as 51 954 - a world record crowd for a tennis match, breaking the record set in November 2019 when Federer defeated Germany's Alexander Zverev in Mexico City in front of 42 517 fans.
It was the sixth instalment of exhibition matches for Federer's foundation.
To date, the foundation has raised over $52 million in support of educational and athletics programmes for children in Africa.