MELBOURNE, Australia (AP) -- Give Roger Federer credit for always showing up and always staying until the end, no matter how sick or hurt he might be.
No, he did not beat Novak Djokovic in the Australian Open semifinals.
As it was, Federer was able to make a match of it for only about one set and about one hour before succumbing to the defending champion 7-6 (1), 6-4, 6-3 on Thursday night at Melbourne Park.
He was dealing with a painful groin muscle that cropped up during a five-setter in the previous round. It limited the movement of a guy who is 38 to begin with, kept him off the practice court on Wednesday and led him to take a medical timeout during his quarterfinal and another after the first set against Djokovic.
''Today was horrible, to go through what I did. Nice entrance. Nice sendoff. And in between is one to forget, because you know you have a 3% chance to win,'' Federer said. ''Got to go for it. You never know. But once you can see it coming, that it's not going to work anymore, it's tough.''
Still, the 20-time Grand Slam champion was out there until it was over.
Federer, after all, never skips a Grand Slam match altogether and never leaves early, no matter what.
He has played 1,513 tour-level matches and not retired midway through one. Not once.
He has played 421 matches at major tournaments since 1999 and not given his opponent a walkover. Not once.
On only four occasions during his lengthy and accomplished career, at non-majors has Federer needed to withdraw from a match before it started.
One of those came when he was supposed to face Djokovic for the title at the season-ending ATP World Tour Finals in London in 2014, but he begged off because of a bad back.
''London was the worst, having to go apologize to people for not being able to walk properly,'' Federer recalled Thursday. ''So I'd rather have this, to be honest.''
After securing a spot in his record eighth Australian Open final, and closing in on what would be a 17th major championship, Djokovic kept using the word ''respect'' while discussing Federer.
That Federer showed up at all, because, as Djokovic explained: ''Obviously, he was hurting. You could see it in his movement.'' That Federer continued until the very last point. And that he did as much as he did, moving out to a 4-1, love-40 lead before getting reeled back in.
Djokovic's own injury history includes quitting a match early as recently as the last Grand Slam tournament, the U.S. Open in September, because of a left shoulder problem. He was booed off the court when he left in the third set.
That completed a career Grand Slam of sorts for Djokovic, actually, with at least one mid-match retirement at each major: the French Open in 2005 (back) and 2006 (trouble breathing), Wimbledon in 2007 (foot blister) and 2017 (elbow), and the Australian Open in 2009 (heat illness).
''I did have retirements throughout my career. I know how it feels when you're hurt on the court. I know the amount of thoughts that go through your mind -- whether or not you should continue or not, whether it's going to get worse. Only the player knows at that moment what you go through,'' Djokovic said.
''Obviously it's really hard to compare injuries, because everyone goes through their injury respectively, individually,'' he continued. ''But it's, I think, an amazing fact that he has never retired (from a) match, not a single match, throughout his career. Huge respect for that.''
Federer said he would not have stepped out into Rod Laver Arena if he did not believe there was at least a tiny chance that he could compete - and win.
''I did believe there was something that could be done today. And also must have felt like at least it was probably not going to get worse. If it did, this would have been my first retirement today,'' he said, noting that he had a scan of the muscle Wednesday and would have another now that his tournament is finished.
''We did talk about it with the team: How bad is it allowed to feel? And all that stuff. But it never went there, so that's good,'' Federer said. ''But you're playing careful, obviously.''
Howard Fendrich covers tennis for The Associated Press. Write to him at hfendrich(at)ap.org or follow him on Twitter at http://twitter.com/HowardFendrich
More AP Tennis: https://www.apnews.com/apf-Tennis and https://twitter.com/AP-Sports