You could never really separate the joy from the pain for Andy Murray. You could see the pain in the effortful game that contained an almost masochistic willingness to run until he dropped. It was written in the anguished faces he made when he flubbed shots in critical moments. He seemed to go looking for pain when he allowed so many matches that might have been easy wins to become grueling marathons.

The pain finally got the best of Murray in recent months, as a largely unsuccessful hip surgery he underwent last January in a last-ditch effort to extend his career didn't do enough to quell his discomfort. He announced Friday at the Australian Open that he would retire from tennis, at age 31, after Wimbledon -- if he even plays that long.

The sinewy Scot reveled in the physicality of tennis. That appetite enabled him to mount the remarkable campaign that produced his career moment -- a season-ending win against Novak Djokovic at the 2016 ATP World Tour Finals. That triumph was his 25th consecutive win in a furious drive that ensured Murray, already the first British man to reach the top ranking, would finish as the year-end No. 1 on the final day of the official season, as well.

But that inspired performance might have cost Murray the longevity so many of his 30-something peers, led by 37-year-old Roger Federer, now enjoy. Murray revealed in an emotional news conference Friday at Melbourne Park that, although he had played with some hip pain for much of his career, the discomfort rose to a serious new level in his five-set loss in the 2017 French Open semifinal to Stan Wawrinka -- a match Murray led by two sets to one, with a tiebreaker in the fourth.

The truth is, Murray never was the same after that furious, exhaustive drive of 2016.

The loss to Wawrinka was reminiscent of the many tussles Murray had with three other titans he spent most of his career trying to run to ground: Federer, Rafael Nadal and Djokovic. While all three had superior head-to-head records against Murray (he is a combined 29-56 against them), they respected and feared him, fully acknowledging Murray as their equal in the elite Big Four.

The true measure of Murray's perseverance took place repeatedly at the Australian Open, where he made his debut as a Grand Slam finalist almost eight years ago. It seemed an ideal tournament for Murray, who embraced the challenge of playing in the heat and preferred hard courts. But Murray lost that initial final to Federer. Murray lost the next one the following year to Djokovic. And a couple of years after that, he lost again to Djokovic.

In many respects, Andy Murray played second fiddle to his Big Three cohorts, but the former world No. 1 has been as dogged a competitor as there is. AP Photo/Aaron Favila

Those were all painful losses, as were the two that followed, amounting to five runner-up finishes in all in Melbourne. Murray was unable to suppress his disappointment after his most recent run to the final in 2016, as his then-pregnant wife, Kim, anxiously watched back at home in England. "You've been a legend the last two weeks -- thank you so much for all your support," Murray said during the trophy presentation, his eyes welling up as he addressed her. "And I'll be on the next flight home."

That, too, was quintessential Murray. He seemed part-caveman, with that wild hair. It often looked like he had slept in his tennis clothes. Murray shuffled along like a comic strip character in those ankle braces that made it look like he was wearing ski boots. But he was no slob in his heart. He was attuned to the needs of those close to him, and especially cognizant of the value of the women in his life. And he knew how overlooked women were in the game and what they could bring to it if given the opportunity. He acted on that knowledge, hiring Amelie Mauresmo as his coach for a spell, and speaking out publicly on issues like equal pay for both sides of the draw. And his mother, Judy Murray, has been a constant presence throughout his career.

Murray's greatest single tournament achievement was his triumph at Wimbledon in 2013, when he became the first British male champion since Fred Perry in 1936.

It's hard to overstate the amount of pressure the British public's overt longing for a men's champion put on its native players at Wimbledon over the decades, but Murray handled it with astonishing aplomb. After he won, he admitted, "It's hard. It's really hard. You know, for the last four or five years, it's been very, very tough, very stressful, a lot of pressure. The few days before the tournament, really difficult. Because it's just kind of everywhere you go."

All that stress. All that pain. Tough. Hard. The story of Murray's life -- because he was born in an impossible era -- meant he had an uphill fight for his entire career, and he never stopped pushing. But his hip gave out before his heart.

There's only so much pain anyone can take.