(CNN) -- Novak Djokovic ended Roger Federer's hopes of a second successive Australian Open title with a thrilling victory in their semifinal on Thursday night.
The Serbian third seed won 7-6 (7-3) 7-5 6-4 in Melbourne to set up a final against either British fifth seed Andy Murray or Spain's No. 7 David Ferrer, who play on Friday.
Djokovic beat Federer in straight sets at the same stage on his way to winning the 2008 title in Melbourne, which was his first and only grand slam success so far.
"He puts a lot of pressure on you, so I tried to stay to the last moment and really it was one of the best matches I've played in a while," the 23-year-old told the crowd after the match.
"I had to take my chances. In the second set I was a break up and in 20 minutes I was 5-2 down, so if I had lost that set God knows which direction the match would go."
Second seed Federer had been hoping to extend his record 16 major crowns following main rival Rafael Nadal's quarterfinal defeat to compatriot Ferrer on Wednesday.
"Novak was the better player tonight, I've got to accept that and move on," Federer said.
"It's not the end, anyway. I wish I could have won here for the fifth time, but it was impossible tonight."
He and Nadal have won 21 of the past 23 grand slams between them, a run broken only by Djokovic and Argentina's Juan Martin Del Potro at the 2009 U.S. Open. The 2008 Melbourne final was the last grand slam not to feature either Nadal or Federer.
The Swiss player struggled to stem Djokovic's aggressive assault on Thursday, and uncharacteristically struggled with his serve.
He saved three match-points in the final game, but his resistance ended with a tame return into the net to finish a match lasting three hours.
"I can move on from this with a good mindset, to be honest," Federer told reporters. "That's what's important right now, that I don't feel like I have physical issues or I'm not playing the right way and whatever. So I'm really positive about what's ahead of me."