Beijing:World Cup champions Germany and Spain gatecrashed into the Olympic men's field hockey final on Thursday after avenging the heartbreak at Athens four years ago.
Spain fought back after being two goals down to upset reigning Olympic champions Australia 3-2 in a thrilling semi-final, Santi Freixa scoring the winner two minutes before the final whistle.
Germany defeated the Netherlands 4-3 in a penalty shoot-out in the other semi-final after the European heavyweights were locked 1-1 at the end of extra-time.
Spain had lost to Australia and Germany were beaten by the Dutch in the semi-finals at Athens, but defied the form book and pre-tournament predictions to set up an intriguing gold medal clash on Saturday.
It will be Germany's first final since winning the gold medal at Barcelona in 1992, while Spain will bid for their first Olympic title after losing the deciders in 1980 and 1996.
Australia appeared to have sewn up the game when Des Abbott scored within 30 seconds of the start and Eddie Ockenden increased the margin early in the second half.
Spain, often regarded as the best team never to have won the Olympic title, drew level with Eduard Tubau scoring twice in a five-minute burst before Freixa slammed the winner following a penalty corner.
A desperate Australia took the unusual step to replace goalkeeper Stephen Lambert with a striker in a bid to equalise in the last two minutes, but the Spaniards held their ground to complete a remarkable win.
Earlier, Germany rode on a rare error by Dutch sharpshooter Taeke Taekema in the penalty shoot-out to make their first Olympic final in 16 years.
The shoot-out itself went into sudden death as both teams drew 3-3 after the first 10 strokes.
As Christopher Zeller made it 4-3 for Germany, Taekema, the tournament's leading scorer with 10 goals, scooped straight and high to allow goalkeeper Max Weinhold to palm the ball over the goal post.
"It was an emotional win," said German coach Markus Weise, who led the women's team to the gold medal in Athens before taking up the men's job after Bernhard Peters switched to football.
"The penalties can go either way but I am pleased the way we fought back during real time after being a goal down. The boys did not let their heads drop."
Veteran Dutch goalkeeper Guus Vogels, a four-time Olympian, said he was heartbroken to see his side go out in sudden death.
"It is sad but I think we played the best we could," he said. "We should have done it in 70 minutes of regulation time. But we gave it away in the end."
Germany should have sealed the match in the first session of extra-time when a high ball rebounded off the Dutch goalkeeper, but Philip Witte failed to connect in front of an open goal.
The rivals ended level in regulation time after a scrappy encounter sparked to life in the last four minutes.
Timme Hoyng put the Dutch ahead in the 66th minute, before Germany equalised two minutes later through Philipp Zeller.