Novak Djokovic edged out Rafael Nadal to finish third at the 6 Kings Slam in Saudi Arabia after an emotional last clash between two greats of the sport.

Nadal and Djokovic lost to Carlos Alcaraz and Jannik Sinner respectively in the semi-finals, setting up a memorable third-place play-off between this pair of tennis heavyweights on Saturday.

Spain's Nadal is set to retire after the Davis Cup Finals conclusion in November, with his last outing in an individual event ending in a 6-2 7-6 (7-5) defeat ahead of his impending retirement.

The 38-year-old struggled in the first set against familiar foe Djokovic, who broke in the opening game en route to a comfortable first-set victory.

Nadal improved in the second set as the pair exchanged early breaks, with Djokovic forced to work to stay in the contest.

That resilience paid dividends for the Serbian to put him on the brink of victory, though Nadal managed to save a match point with a blistering forehand winner before levelling at 5-5.

Djokovic's dominant first serve did not let him down in the tiebreak, though, as the 24-time major champion battled past Nadal for one final time.

Data Debrief: Djokovic snatches bragging rights

Though this was an exhibition encounter, Djokovic will be delighted to have had the final say in the last dance between this great duo.

Across 61 meetings in official tour-level competitions, Djokovic boasts a slightly favourable record, winning 32 times and losing on 29 occasions.

This Riyadh victory may prove the final meeting of any kind between the pair, though it will live long in the memory as Nadal prepares for an emotional farewell in Malaga.