'It's tough': The 'horrible' truth in Roger Federer's Australian Open loss

Roger Federer has admitted that the first retirement of his career was a possibility during a gut-wrenching Australian Open defeat to Novak Djokovic.

An injury-hampered Federer was knocked out in straight sets of Thursday night's semi-final by Serbia's World No.2.

'SUBLIME’: Novak Djokovic stuns Roger Federer with 'insane' shot

'WHAT LIFE IS ALL ABOUT’: Ash Barty's 'humble' take on Australian Open heartbreak

'WHAT SPORTSMANSHIP LOOKS LIKE': Rafa Nadal's incredible act after Australian Open loss

Djokovic sealed his spot in an eighth Australian Open final courtesy of a 7-6 (7-1) 6-4 6-3 win on Rod Laver Arena.

Federer's record of never retiring from an ATP match was in doubt due to a groin injury suffered in his quarter-final miracle win over Tennys Sandgren.

Fears of that possibility grew on Thursday afternoon when the 38-year-old moved his practice session behind closed doors, with organisers unsure whether he'd be fit for the semi-final.

Federer battled through the problem valiantly but admitted afterwards that he only gave himself a three percent chance of beating Djokovic going into the contest.

Roger Federer laments his Australian Open semi-final defeat to Novak Djokovic.
An injury hampered Roger Federer said he only had a slim chance of beating Novak Djokovic. Pic: Getty

"Today was horrible, to go through what I did," he said.

"Nice entrance, nice send-off, and in between is one to forget because you know you have a 3 per cent chance to win. You know, 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.

"I've been there before. I've had a few matches throughout my career where I've felt that way. It also happened the same way. Better that than zero, I tell you that."

Federer said that he was prepared to quit mid-match if the injury worsened - something the Swiss great has never had to do in his storied career.

"I (always) thought I was going to make it to be honest," he said.

"I went for a scan that night and was alright and after that we didn't push it. I didn't practice, we took a day off the next day and today I really rested it to as late as possible.

Federer did call a medical timeout at the end of the first set but played down the extent of the problem at the time.

Swiss great ‘did believe’ he had a chance

"The timeout today was just one of the things that need to be done to prevent any further problems, and once I was back in the match I felt I was probably going to able to finish which was a good thing.

"It's frustrating, but I don't think I would have gone on court if I felt I had no chance to win. I still was able to make a match out of it. I did believe there was something that could be done today.

"The injury was probably not going to get worse, and if it did this would have been my first retirement today. We did talk about it with the team but it never went there which is good - you're playing careful obviously."

Federer got off to a blistering start in the match, jumping out to a 5-2 lead in the first set before Djokovic clawed his way back.

With the Swiss master on the verge of taking a surprise one set lead, Djokovic stepped up a gear to silence the pro-Federer crowd with a scintillating tiebreak masterclass.

In Djokovic's last four tiebreakers against Federer, including three during his epic win in last year's Wimbledon final, he hasn't made an unforced error.

After the first set went for more than an hour, the rest of the match only took another 76 minutes.

"It could've definitely gone a different way if he (Federer) got those break points (in the first set)," Djokovic said.

"He started off really well, I was pretty nervous at the beginning.

"Respect to Roger for coming out tonight, he was obviously hurt and wasn't at his best.

"I managed to dig my way through and it was important that I won the first set mentally and I was able to relax a little bit after that."

With AAP