Djokovic, the world No. 1-ranked player, had a cross-court winner on his third match point to finish off a 1-6, 7-5, 6-4, 6-7 (5-7), 12-10 win over the 15th-seeded Wawrinka. The final set took 1 hour, 43 minutes and pushed the match time to 5 hours, 2 minutes, ending about 1:40 a.m. Monday in Melbourne.
Djokovic improved to 12-2 lifetime against Wawrinka, including the last 11 times they played. However, the match that started Sunday showed the players being much closer.
Wawrinka grabbed the advantage with a break in the first game of the fifth set -- his seventh break of the match -- but Djokovic immediately broke back. Wawrinka had two break points at 4-4 by Djokovic managed to hold.
Neither player had another break chance until the final game when Wawrinka, who was up 40-15 in the game, fought off two and had two more chances to win the game before Djokovic's final winner.
Wawrinka took the first set and was up 5-2 in the second before Djokovic got on track, winning five straight games to even the match. Djokovic turned the third set on a ninth-game break but Wawrinka forced a fifth set by taking the first three points -- two off Djokovic's serve -- of the fourth-set tiebreaker.
There was much less drama in Sunday's other fourth-round matches as No. 4-seeded David Ferrer and fifth-seeded Tomas Berdych advanced in straight sets. Also moving to the quarterfinals was 10th-seeded Nicolas Almagro, who was up 6-2, 5-1 when No. 8-seeded Janko Tipsarevic retired due to a left foot injury.
Ferrer got by 16th-seeded Kei Nishikori 6-2, 6-1, 6-4 with seven breaks. Nishikori had a pair of breaks himself but also committed 65 unforced errors (Ferrer had 24) and Ferrer took 55 percent of the points when receiving serve.
Berdych eliminated unseeded Kevin Anderson 6-3, 6-2, 7-6 (15-13). Berdych had a pair of breaks in each the first two sets and another in the third before coming out ahead on the lengthy tiebreaker.
Djokovic next goes against Berdych, another player he has previously dominated. Djokovic is 11-1 with a nine-game winning streak over Berdych. Ferrer is to meet Almagro in an all-Spanish quarterfinal. Ferrer is 12-0 lifetime versus Almagro, including a 4-0 mark in 2012.