Roger Federer explains why winning the 2017 Australian Open for the 18th Grand Slam title of his career stands by itself when compared to his other victories. (2:04)

Roger Federer rejected Pat Cash's criticism of his fifth-set medical timeout during his victory over Rafael Nadal in the Australian Open final on Sunday night.

Cash, working for BBC's Radio 5 Live, called the lengthy break "legal cheating," lashing the 18-time Grand Slam winner for his approach.

"It's cheating and it's being allowed. It's legal cheating, but it's still not right," the 1987 Wimbledon winner said.

Federer also took a timeout during his semifinal success over Stan Wawrinka, although that came after his countryman also needed a medical break.

But the Swiss defended his integrity after the match, saying he was playing through pain and had a track record of avoiding the treatments at all costs.

Roger Federer rejected Pat Cash's criticism of his fifth-set medical timeout during his victory over Rafael Nadal in the Australian Open final. Photo by Clive Brunskill/Getty Images

"My leg has been hurting me since the [second-round match vs. Noah Rubin]," he said. "I was able to navigate through the pain. For some reason against Stan I had it from the start on both sides of the groin. I felt my quad midway through the second set already, and the groin started to hurt midway through the third set.

"I just told myself, The rules are there that you can use them. We shouldn't be using these rules or abusing the system. I think I've led the way for 20 years. So I think to be critical there is exaggerating. I'm the last guy to call a medical timeout. I don't know what he's talking about."

After losing the fourth set 6-3, Federer recovered to win the final set by the same score.

Nadal said he had "no opinion" on Federer's medical timeout.

Federer missed the final six months of last year's tour after undergoing surgery on an injured knee.