An emotional Roger Federer of Team Europe is consoled by...

An emotional Roger Federer of Team Europe is consoled by his playing partner Rafael Nadal after their Laver Cup doubles match against Team World's Jack Sock and Frances Tiafoe at the O2 arena in London, Friday, Sept. 23, 2022. Credit: AP/Kin Cheung

MALAGA, Spain — Roger Federer says Rafael Nadal made him enjoy tennis “even more” during a rivalry that spanned 40 matches over 15 years.

Writing on social media Tuesday, hours before the start of the Davis Cup Final 8, Nadal's last event before heading into retirement, Federer began his message with the word “Vamos” and said: “As you get ready to graduate from tennis, I’ve got a few things to share before I maybe get emotional.”

“Let’s start with the obvious: you beat me — a lot. More than I managed to beat you. You challenged me in ways no one else could,” Federer said. “On clay, it felt like I was stepping into your backyard, and you made me work harder than I ever thought I could just to hold my ground. You made me reimagine my game — even going so far as to change the size of my racquet head, hoping for any edge.”

Federer, now 43, was established at No. 1 in the rankings when Nadal, now 38, came along. Federer started his career with a 7-0 record in Grand Slam finals before his first loss at that stage arrived against Nadal in the 2006 French Open final, the first of their three consecutive title matches in Paris — each with the same result.

Nadal also defeated Federer in the 2008 Wimbledon final, ending the Swiss star’s bid for a sixth championship in a row at the All England Club.

In all, Nadal led their head-to-head series 26-14, including 10-4 at Grand Slam tournaments and 6-3 in Slam finals.

Still, Federer told Nadal in his post, referring to him by the nickname Rafa: “You made me enjoy the game even more.”

An emotional Roger Federer, left, of Team Europe sits alongside...

An emotional Roger Federer, left, of Team Europe sits alongside his playing partner Rafael Nadal after their Laver Cup doubles match against Team World's Jack Sock and Frances Tiafoe at the O2 arena in London, Friday, Sept. 23, 2022. Credit: AP/Kin Cheung

They helped form the Big Three of men's tennis along with Novak Djokovic, who is still active at age 37 and has won a men's-record 24 major trophies. Nadal is next on the list with 22, followed by Federer with 20.

“What an incredible run you’ve had,” Federer posted. “Including 14 French Opens — historic! You made Spain proud ... you made the whole tennis world proud.”

When Federer left the sport by playing a doubles match at the Laver Cup in September 2022, his partner was Nadal. The two sat side-by-side afterward, crying.

“It meant everything to me that you were there by my side — not as my rival but as my doubles partner," Federer wrote Tuesday. "Sharing the court with you that night, and sharing those tears, will forever be one of the most special moments of my career.”

Switzerland's Roger Federer left, and Spain's Rafael Nadal pose for...

Switzerland's Roger Federer left, and Spain's Rafael Nadal pose for a photo prior to the start of the men's singles final on the Centre Court at Wimbledon, July 6, 2008 Credit: AP/Anja Niedringhaus

Nadal's Spanish team was scheduled to meet the Netherlands in the Davis Cup quarterfinals Tuesday. Neither Nadal nor Spain's captain, David Ferrer, would say Monday whether Nadal will play singles or doubles, both — or neither.

“Rafa, I know you’re focused on the last stretch of your epic career. We will talk when it’s done,” Federer wrote. “I want you to know that your old friend is always cheering for you, and will be cheering just as loud for everything you do next.”