MELBOURNE, Australia — Novak Djokovic reached a fifth Australian Open final, avenged a long and arduous loss to Stan Wawrinka and ensured he’d renew an old rivalry with Andy Murray.

The top-ranked Djokovic was so absorbed in the moment, he lost track of the score during Friday’s semifinal. His mental lapse after the third set probably cost him the fourth, but the four-time Australian Open champion recovered with three service breaks in the fifth set to beat defending champion Wawrinka 7-6 (1), 3-6, 6-4, 4-6, 6-0.

“Sometimes these things happen, you get carried away by a moment,” Djokovic said, trying to explain his perplexed expression after he’d taken a lead of two sets to one. “I was very confused when I saw the security on the court.

“The circumstances, obviously playing Grand Slam semifinals against the defending champion … a lot of emotions going around. Sometimes you can’t keep track of the score.”

Djokovic has a 100 percent winning record in finals at Melbourne Park, claiming his first Grand Slam here in 2008 and winning three straight titles from 2011 before losing in the quarterfinals last year to Wawrinka. Only Roger Federer and Stefan Edberg had reached five men’s finals at the Australian in the Open era.

The previous two meetings between Djokovic and Wawrinka at the Australian Open had gone to five sets and lasted a combined nine hours. Friday’s match lacked that kind of intensity and memorable moments.

“Strange,” Wawrinka said. “Not the best.”

At times Wawrinka got on top of Djokovic, who sometimes looked lethargic. Despite dropping serve in four of the five sets, Djokovic kept his composure in the 3-hour, 30-minute match as Wawrinka blasted 42 winners but offset that with 69 unforced errors.

The momentum shifted suddenly in three of the five sets, with both players wasting breakpoint opportunities. Djokovic hit 27 winners – none in the fourth set – and finished with 49 unforced errors.

“The battle was great … in terms of fighting from both sides,” Djokovic said, “but the level of performance was not where I wanted it to be.”

It was good enough to increase his career record to 17 wins in 20 matches against Wawrinka. The Swiss player will drop to No. 9 when the next rankings are released.

“There’s no pressure for that,” Wawrinka said of the burden of defending a title. “But, no, for sure we had some great battles here last two years. Today was strange match. He was there playing good enough to win and he deserve to win and play the final.”

Murray is moving in the other direction, restoring his position in the so-called Big Four of major winners that includes Djokovic, No. 2 Federer and No. 3 Rafael Nadal, who dominated the Grand Slam titles for so long.

Sixth-seeded Murray moved into the championship match with a fiery four-set win over No. 7 Tomas Berdych on Thursday.

Djokovic has beaten Murray in seven of their last eight matches and is 15-8 overall, but they’re level in Grand Slam finals with two wins apiece.