Roger Federer defeated Nadal in last year's Hamburg Masters final
Rafael Nadal defeated a tenacious Novak Djokovic 7-5 2-6 6-2 at the Hamburg Masters to set up another final with defending champion Roger Federer.
The Spaniard needed a little over three hours to beat the Australian Open champion in a semi-final win which secured his world number two ranking.
Nadal saved 15 of 19 break points and broke serve in the first and seventh games of the deciding set.
Earlier, Federer had claimed a 6-3 6-1 victory over Italy's Andreas Seppi.
Seppi, the world number 43 contesting his first Masters Series semi-final, had his moments in the first set, but never threatened the title holder.
Roger played a little over an hour of tennis today, while I played more than three- I just have to make sure I am 100% ready
It will be a familiar line-up on Sunday as Federer, chasing his fifth Hamburg crown, beat Nadal in last year's final to end the Spaniard's 81-match winning streak on clay,
The second seed, however, might feel the effects of a gruelling semi-final, which was nearly two hours longer than Federer's match against Seppi.
The 21-year-old had to be at his best to beat Djokovic, who would have overtaken the Mallorcan as the world number two had he won.
And he secured victory on his fifth match point when Djokovic netted an attempted drop shot at the end of a 15-minute final game.
Afterwards, Nadal joked: "I am looking forward to playing in Roger's home.
"He has won here four times, he loves it here, it will be a very tough match.
"Roger played a little over an hour of tennis today, while I played more than three - I just have to make sure I am 100% ready."
Djokovic was not too downcast by his defeat, saying: "It was one of the best matches I have played, maybe the best I have ever played in on clay.
"I just want to take the positive things out of it. Nadal is the best defensive player in the history of the sport."