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 champion Australia 3-2 in a thrilling semifinal, 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 semifinal after the European heavyweights were locked 1-1 at the end of extra-time. Spain had lost to Australia and Germany was beaten by the Dutch in the semifinals at Athens, but defied the formbook 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 equalize in the last two minutes, but the Spaniards held their ground to complete a remarkable win. Pakistan suffered its worst-ever finish in the men's hockey at the Olympics when it was beaten 2-4 by New Zealand in the playoff for seventh place. It was Pakistan's lowest ever finish in the Games. The previous worst had seen it twice finish fifth in the Olympics - at Athens in 2004 and at Seoul in 1988.