Following the announcement of both Serena Williams and Roger Federer's retirement, tennis will bid farewell to two of the best players to ever grace the court.

During their legendary careers, the two won a combined 43 Grand Slam singles titles — Williams with an Open Era record of 23 and Federer tallying 20.

Their paths crossed on the court three years ago when the two faced off in a mixed doubles clash that remains one of the most iconic matches in history.

When did Roger Federer play Serena Williams?

The once in a lifetime occasion took place at the Hopman Cup in 2019.

It was widely anticipated by fans and professionals alike, who knew they would never get to see a match of such calibre again.

A record 14,029 crowd packed out the Perth Arena in Australia to watch the two trailblazers compete against each other for the first time.

Ahead of the match, both players took time to honour the magnitude of the occasion and pay respect to each other.

Video: Watch highlights from Roger Federer vs Serena Williams

"As a player, it's something you would dream of — to play Roger Federer — and it's still like a dream come true for me," Williams said.

"I really look forward to sharing that stadium with him, it's going to be special."

Federer echoed his opponent's sentiment and described the match as a "big deal" for both of them.

"I think for both of us we will probably play it down a little bit and say like 'it's not that big a deal for us, it's just another tennis match' but it really isn't. It's probably going to happen once and never again."

PERTH, AUSTRALIA - JANUARY 01: Frances Tiafoe and Serena Williams of the United States stand with Roger Federer and Belinda Bencic of Switzerland following the coin toss before the mixed doubles match during day four of the 2019 Hopman Cup at RAC Arena on January 01, 2019 in Perth, Australia. (Photo by Paul Kane/Getty Images)

What happened in the match?

It was a mixed doubles clash dubbed the 'battle of the legends', which saw Switzerland take on the USA.

Federer was joined by Belinda Bencic, while Williams competed alongside Frances Tiafoe.

It was a competitive match but one full of feel-good moments and fine spirits, most likely due to the amicable respect each player had for their opponents.

After two sets, Federer scored the winning point, smashing home a volley during the tiebreak to make it 4-2, 4-3 to the Swiss.

The win saw Switzerland edge 2-1 over the USA in their round robin match, after Williams beat Bencic 4-6, 6-4, 6-3, and Federer secured a 6-4, 6-1 win over Tiafoe.

Video: Watch the Roger Federer vs Serena Williams mixed doubles match in full

Following the match, and in front of a roaring crowd in Perth, Federer and Williams had nothing but compliments for each other.

"This is maybe what I've always wanted, a big time moment like this," Federer said.

"He has a killer serve, literally you can't read it. There's a reason why he's the greatest because you can't be that great and not have such an awesome weapon like that serve," Williams replied.

Serena Williams and Roger Federer at the 2019 Hopman Cup

PERTH, AUSTRALIA - JANUARY 01: Serena Williams of the United States and Roger Federer of Switzerland take a selfie following their mixed doubles match during day four of the 2019 Hopman Cup at RAC Arena on January 01, 2019 in Perth, Australia. (Photo by Paul Kane/Getty Images)

The two retire after completing incredible careers filled with countless memorable moments. It's certainly a sad time for tennis as this era of greats draws to a close but the promise of a new generation of talent is just as exciting.