The end for Roger Federer was perfectly fitting.

Mirroring his moves on the tennis court for all these years, Federer’s ending was pure poetry. He went out the way he arrived, played and stayed for 24 years in the tennis spotlight: With grace, class and understatement.

The 41-year-old Federer, who on Thursday via social media announced his retirement from the sport he dominated like no one ever has, leaves tennis as the greatest player of all time.

Never mind that his 20 career Grand Slam titles place him third behind Rafael Nadal (22) and Novak Djokovic (21). Federer is the GOAT for the entire package that he was as a player and a human being. He was flawless at both.

The thing I’ll remember most about Federer is what immediately struck me the first time I saw him play in person, at a tournament in Key Biscayne, Fla. some 20 years ago: No player in the history of the grueling sport made it look as effortless as he did.

I remember Tiger Woods being at that match in Miami and looking completely mesmerized by what Federer was doing on the tennis court — much the way so many would look at what Woods did on the golf course.

Roger Federer waves after winning the 2017 Australian Open.

Federer glided around the court with the elegance of an Olympic figure skater and hit ground strokes with a precision and touch that made it look like he was loafing, yet they were struck with such deceptive force they were lethal to the opponent.

Federer possessed the most remarkable skills I’ve ever seen and the ability to hit some shots that no one in the sport had ever hit.

Another beauty to Federer was how humble he always was. When the likes of Nadal and Djokovic emerged as threats to his throne, beating him in Grand Slam finals, Federer attacked his own weaknesses — as few as they might have been — and made himself even better.

He leaves the game with 103 ATP singles titles, the record eight men’s singles titles at Wimbledon and a record-tying five at the U.S. Open as part of his 20 Grand Slam titles.

Roger Federer kisses the trophy after winning Wimbledon in 2017.

It’s no accident that Woods, the most dominant player in golf history, quickly took a liking to Federer. Game acknowledges game. Greatness recognizes greatness.

On and off the court, you’d be hard-pressed to find an athlete in the sport who was more universally admired (by even his most ardent rivals) for the way he carried himself and treated people — in victory and defeat.

Federer’s quiet departure comes in such stark contrast to Serena Williams’ noisy exit from the game at the U.S. Open, which she overwhelmingly took over in terms of attention before she was eliminated.

Federer could have orchestrated a grand finale for himself at one of the majors, perhaps next summer at Wimbledon. Selfishly, we’d all rather have had that so we’d have a chance to say a proper “goodbye.”

Tiger Woods and Roger Federer in 2007.

But that’s not Federer’s his style. Never has been.

Fittingly, instead of making his retirement from the sport about himself, Federer made it about everyone but himself.

The 845-word goodbye letter Federer posted on his social media channels was filled with appreciations directed toward his wife, Mirka, and their four children for their support, to his parents and sister, to Swiss tennis for giving him the opportunity to be great by seeing it in him, to his team of coaches, managers, physios, etc., to his sponsors and even his competitors for pushing him.

Federer also offered a “special thank you” to his fans, saying, “you will never know how much strength and belief you have given me.”

Roger Federer announced his retirement from tennis on Thursday.
AFP via Getty Images

His final thank you was to the game of tennis, to which he said, “I love you and will never leave you.”

Game, set, match — at love. A perfect ending.