Novak Djokovic spent five hours chasing down returns against Switzerland’s Stanislas Wawrinka on Sunday at the Australian Open. Djokovic won the marathon like he won last year’s final marathon over Rafael Nadal.

Dita Alangkara/Associated Press

Novak Djokovic spent five hours chasing down returns against Switzerland’s Stanislas Wawrinka on Sunday at the Australian Open. Djokovic won the marathon like he won last year’s final marathon over Rafael Nadal.

MELBOURNE, Australia – The opponent was different, the match three rounds earlier.

Still, the result gave Novak Djokovic a familiar feeling, and another chance to rip off his shirt in celebration.

Djokovic needed 5 hours to beat Stanislas Wawrinka 1-6, 7-5, 6-4, 6-7 (5), 12-10 in a fourth-round match Sunday night at the Australian Open, on the same court where he needed 5:53 to beat Rafael Nadal in last year’s final.

“I just had flashback of 2012,” Djokovic said. “It was maybe 45 minutes less this match than the one 12 months ago, but still it was still as exciting. I tried to enjoy the moment and couldn’t ask for more. What a match point ... unbelievable.”

He wasn’t exaggerating about the match point. On his third attempt to end it, his backhand cross-court shot zipped past the valiant Wawrinka, who, Djokovic conceded, had outplayed him for most of the night.

“He came up with great tactics,” Djokovic said. “He didn’t give me a lot of the same rhythm that I could get into the match. He was the one being in charge. I was passive.”

The win was Djokovic’s 18th in a row at Melbourne Park after winning the last two Australian titles and advanced the Serbian star to the quarterfinals of his 15th consecutive major tournament.

Wawrinka, who had been receiving treatment to his upper leg muscles from late in the fourth set, said he would take more positives than negatives out of the match. He led 5-2 in the second set after outplaying Djokovic in the first.

“For sure, I think the best match I have ever played,” Wawrinka said.

“I fought like a dog like always. At 4-4 in the final set, I thought I might have won the match, but he was just better.”

Djokovic will next play No. 5 Tomas Berdych, who needed five match points in the tiebreaker before beating South Africa’s Kevin Anderson 6-3, 6-2, 7-6 (13).

Fourth-seeded David Ferrer won 6-2, 6-1, 6-4 over No. 16 Kei Nishikori of Japan to set up a quarterfinal against fellow Spaniard Nicolas Almagro, who was leading 6-2, 5-1 when No. 8 Janko Tipsaveric retired from their fourth-round match.

Sharapova advanced to the quarterfinals with a 6-1, 6-0 win over Kirsten Flipkens in another impressive display – last year’s French Open champion has lost just five games through four rounds, breaking the Australian Open mark of eight held previously by eventual champions Steffi Graf and Monica Seles.

“A couple that I’ve won, I felt like I was playing great from the beginning, and I was able to carry that through the whole tournament,” said Sharapova, who won titles in 2004 at Wimbledon, 2006 at the U.S. Open and 2008 in Australia before completing her career Grand Slam with a victory at last year’s French Open.

She can’t remember winning so few games through four rounds of a tournament, but realizes this means nothing if she doesn’t make it to the latter stages.

“Well, I’m certainly happy to be playing this well but ... it only gets tougher from here,” said Sharapova, who is playing her first tournament of 2013 after withdrawing from a warm-up event at Brisbane because of an injured right collarbone.

She next plays fellow Russian Ekaterina Makarova, who beat fifth-seeded Angelique Kerber 7-5, 6-4. Sharapova defeated Makarova in the quarterfinals here last year on her way to the final, which she lost in straight sets to Victoria Azarenka.

Li Na, who reached the final here in 2011 and won the French Open later that year, saved a set point in the tiebreaker before beating Julia Goerges 7-6 (6), 6-1. She’ll play No. 4 Agnieszka Radwanska, who beat No. 13 Ana Ivanovic 6-2, 6-4 for her 13th consecutive win. Radwanska won the Auckland and Sydney titles before coming to Melbourne.