MELBOURNE, Australia (AP) — 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 just over 5 hours to beat Stanislas Wawrinka 1-6, 7-5, 6-4, 6-7 (5-7), 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 today," 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.

It was way hot on Day 4, and this is how Andreas Seppi of Italy cooled off after defeating Denis Istomin of Uzbekistan 7-6 (7-4), 5-7, 6-7 (3-7), 7-6 (7-3), 6-2. Temperatures reached 106 degrees at Melbourne Park.
Fiona Hamilton, AP

After a singles win Serena Williams, left, returned to the court to win a doubles match with sister Venus. They defeated Camila Giorgi of Italy and Stefanie Voegele of Switzerland 6-3, 6-1.
Aaron Favila, AP

Bernard Tomic of Australia thrilled the home crowd with a come-from-behind 6-7 (4-7), 7-5, 7-6 (7-3), 7-6 (10-8) win against Daniel Brands of Germany. Next up for Tomic is Roger Federer.
William West, AFP/Getty Images

Sam Querrey talks with Brian Baker after Baker was forced to retire from their match because of a knee injury. Baker tore his lateral meniscus and has a locked knee. He'll need surgery and about four months to recover.
Chris Hyde, Getty Images

Like this topic? You may also like these photo galleries:

"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 (15-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.

On Monday, Roger Federer plays Milos Raonic, and U.S. Open champion Andy Murray faces Gilles Simon. Azarenka, Serena Williams and fellow American Sloane Stephens also have their fourth-round matches.

Thy will have a tough time matching the spectacle of Sunday's late-night encounter.

Djokovic had beaten Wawrinka — the perennial No. 2 among Swiss tennis players to 17-time major winner Roger Federer — in their 10 previous matches. He hadn't lost a head-to-head since 2006 and had won 11 straight sets between them.

Wawrinka stunned the top-ranked Djokovic with three service breaks in the first set and had that 5-2 lead in the second before the 25-year-old Serb rallied by winning six consecutive games. But just as Djokovic seemed to be taking control, Wawrinka launched his own comeback to win a long tiebreaker and force a fifth set.

Djokovic got to serve first in the fifth, giving him a psychological edge as long as he held his serve.

Wawrinka had game point in the 22nd game but let Djokovic get on a roll. He saved his first match point with a service winner, then saved another two minutes later.

At 1:40 a.m. local time, Wawrinka was whacking his head with the racket and biting the ball after giving Djokovic another match point.

Moments later, he was slumped on the court, exhausted. Djokovic raised both arms, walked to the net and embraced his beaten rival, then pulled of his shirt and flexed.

"Give him credit, he made me run all over the court," Djokovic said. "He never gave me the same ball. He was aggressive from both sides. I didn't know what was coming next."