Seventeen-time grand slam winner and world number 17 Roger Federer outlasted Japan's Kei Nishikori in a titanic five-set battle to reach the 49th quarter-final of his career.

Federer, who is coming off six-month injury layoff, beat the world number 6-7 6-4 6-1 4-6 6-3 in Melbourne, Australia.

The 35-year-old will now play Andy Murray's conqueror Mischa Zverev.

The Swiss legend started the match slowly and withing some minutes into the match, he found himself trailing 0-4. Federer then levelled the match 5-5 before Nishikori struck a faultless backhand return to win the tie-break.

The next two sets were wrapped up by the former world number one in no time before Nishikori stepped up in the four by breaking the Swiss against the run of play to level the match.

But Nishikori aggravated his existing hip injury at the start of the fifth set and capitulated under Federer's relentless pressure.

Federer improved his five-set record to 25-20.

"Kei's a tough customer. This is a huge win for me in my career," Federer said.

"Kei will give you some looks, he's not the biggest server on tour but one of the greatest on the baseline."

Federer holds a career 2-0 record over Zverev, who pulled off a massive upset over world number one Andy Murray earlier on Sunday.

"I would never have picked it, I like Mischa a lot and he has a nice game coming forward. It will be different," Federer said.