Nick Kyrgios has put up a spirited challenge, but the class of Rafael Nadal has come through as the world number one claimed a gripping four-set victory to advance to the Australian Open quarter-finals.

Key points: Nick Kyrgios came close to forcing a deciding fifth set against Rafael Nadal, only to go down in a tiebreak in the fourth

Nick Kyrgios came close to forcing a deciding fifth set against Rafael Nadal, only to go down in a tiebreak in the fourth Both Nadal and Kyrgios secured two service breaks, while the Australian sent down 25 aces

Both Nadal and Kyrgios secured two service breaks, while the Australian sent down 25 aces Nadal will play fifth seed Dominic Thiem in the quarter-finals, as he chases a record-equalling 20th major

Nadal triumphed 6-3, 3-6, 7-6 (8/6), 7-6 (7/4) after three hours and 38 minutes on Rod Laver Arena, having survived an admirable fightback from the 23rd-seeded Kyrgios in the fourth set.

Trailing two sets to one, Kyrgios dropped serve in the third game of the fourth and was forced to play catch-up, as the Spaniard appeared to be motoring towards victory.

Nadal served for the match at 5-4 but was broken by Kyrgios and when the set went to a tiebreak it seemed the contest was still anyone's to win, as the raucous crowd sat on the edge of their seats.

The experience of Nadal, who had not dropped a set in in the tournament prior to tonight, showed in the tiebreak and he converted on his first match point to seal the win, before congratulating Kyrgios at the net following his valiant effort.

"I'm shattered to have lost tonight," Kyrgios said.

"Obviously these are the matches that I want to win the most. But overall all this summer has been fun."

Kyrgios left Rod Laver Arena with his head held high. ( AP: Andy Brownbill )

The 19-time major winner Nadal, who will next face Dominic Thiem, was glowing in his praise of Kyrgios, who had been seeking to make the Australian Open quarter-finals for the first time in five years.

"I think he's a very important player for our sport because he has a big talent," he said.

"He's one of these players that can be very, very interesting for the crowd."

The pre-match build-up on court took place amid great emotion, with Kyrgios wearing Kobe Bryant's LA Lakers' number eight jersey as he walked on Rod Laver Arena to pay respect to the basketball great, who died in a helicopter crash in California.

Kyrgios was brought to tears as a video tribute to Bryant and his 13-year-old daughter Gianna, who also died in the accident, was played just minutes before the match got underway.

Kyrgios paid his respect to Kobe Bryant during the warm-up. ( AP: Andy Wong )

"When I woke up to the news, it was pretty emotional," said Kyrgios, who wore another of Bryant's Lakers jerseys to his post-match media conference.

"It was pretty heavy all day. Obviously I was having (NBA) basketball on at my house, watching the games. I was heavy. It's just tough."

Nadal gets on top in first set

Nadal and Kyrgios packed variety into their games, with both mixing up their pounding ground strokes with clever drop shots and occasional finesse at the net.

Some of the rallies were breathtaking, almost to the point it seemed unfair that there had to be a winner and loser.

Both players held serve in the opening set until the fourth game, when Nadal converted on a second break point as Kyrgios went long with a backhand return.

Trailing 1-3, Kyrgios showed his first sign of frustration as he began berating his players box and he continued talking to himself at the change of ends after Nadal had held serve.

Kyrgios, who needed more than four hours to beat 16th seed Karen Khachanov in an epic five-setter in his previous appearance, recovered enough to win his next service game.

But with a break of serve in his keeping, Nadal was never headed in the first set and he gained a crucial psychological advantage.

A single service break was enough for Nadal to win the first set. ( AP: Lee Jin-man )

Play was briefly halted before the second set when Nadal had a minor racquet drama, the delay attracting boos from the crowd.

Nadal was unfazed by the reaction and had break points in the first game of the set, however Kyrgios did not panic and went on to hold serve.

The turning point of the set came in the fourth game when Kyrgios broke Nadal for the first time, a desperate forehand return just clipping the baseline, prompting Kyrgios to launch into a frenzied celebration.

Kyrgios broke back in the second set to level proceedings on Rod Laver Arena. ( AP: Lee Jin-man )

He consolidated the break by serving to love to establish a 4-1 lead and with the remaining games of the set going on serve, Kyrgios was able to level proceedings.

Neither gave an inch in the third set until the eighth game, when Kyrgios faced a break point but got himself out of jail on the back of his powerful serve.

With the match moving beyond the two-hour mark, Kyrgios's emotions almost got the better of him when he offered a lengthy critique of a line judge's performance to chair umpire James Keothavong.

He momentarily appeared flustered when serving to stay in the set at 5-6, although he was able to hold to send the third set into a tiebreak.

After falling behind 1-3 in the tiebreak, Kyrgios incurred a code violation when he smashed a racquet, which he then attempted to throw into the crowd to a keen spectator.

He did not chuck in the towel and eventually levelled at 5-5, however Nadal got himself back in front — despite blowing a set point — and eventually won the tiebreak 8-6, before clinching the victory in the thrilling fourth set.

Look back at our blog.