Germany beat Spain 1-0 on Saturday to win their third Olympic men's hockey gold.
On the final hooter, the Germans threw their sticks in the air and piled on each other on the pitch, while the Spaniards sat dejected and weeping.
"We all can't believe it. I scored the goal but the whole team did it. We won gold," Christopher Zeller, who scored the only goal, said.
In a scrappy first half which prompted chants of "this game is boring" from the crowd, Germany had the edge over a slow-to-react Spanish side, controlling the ball well in midfield.
Zeller scored the goal in the 16th minute from Germany's second penalty corner with a powerful drag flick into the top right corner of the goal.
Both teams returned from half-time looking fresher, playing more offensive hockey and creating plenty of chances, but Spanish passes often missed their targets.
The final was a repeat of the 2004 Athens bronze medal match, which Germany won 4-3. Germany, which Spain's coach hailed as the best defenders in Beijing, also beat Spain 1-0 in the group stage.
Earlier, Australia won their fourth Olympic men's hockey bronze in a thrilling match, outclassing Netherlands with their impressive attack in a 6-2 victory.
The Germans had beaten the Netherlands 4-3 in the shoot-out after the European heavyweights were locked 1-1 at the end of extra-time in a tense semi-final.
In the other semi-final, Spain shocked defending champions Australia 3-2.
Britain beat South Korea 5-2 to take fifth place. The Koreans finished sixth.
New Zealand downed Pakistan 4-2 in the play-off for seventh-eighth positions.
Belgium finished ninth, beating Canada 3-0.
China picked up their first win thanks to a golden goal from captain Song Yi in the 11th-12th playoff, beating South Africa 4-3.
Final Positions
Men
1. Germany
2. Spain
3. Australia
4. Netherlands
5. Great Britain
6. Korea
7. New Zealand
8. Pakistan
9. Belgium
10. Canada
11. China
12. South Africa
Women
1. Netherlands
2. China
3. Argentina
4. Germany
5. Australia
6. Great Britain
7. Spain
8. United States
9. Korea
10. Japan
11. South Africa
12. New Zealand