Olympic 1500m champion Hicham El Guerrouj ran his way into the history books by adding the 5,000m title to complete a dramatic double.
El Guerrouj celebrates
El Guerrouj sealed victory by out-sprinting world record holder and 10,000m gold medallist Kenenisa Bekele.
World champion Eliud Kipchoge led with 100m to go but was left trailing in bronze when his rivals struck.
El Guerrouj, without an Olympic gold medal until Tuesday, raised two fingers to indicate two golds as he celebrated.
He became the first man since Finnish great Paavo Nurmi in 1924 to win the 1,500m and 5,000m double
"I am very happy. I ran very easy today - I just wanted to stay with Bekele and Kipchoge for the last 100m," said El Guerrouj.
"I was afraid the rhythm of the race would be fast, but my strategy worked and I was able to cope with this fear.
"I felt ready and that is thanks to my coaches and my team-mates. I am extremely happy to have achieved the gold."
At the World Championships a year ago, Kipchoge had held off both El Guerrouj and Bekele to take a shock win.
As the bell approached in Athens, the Kenyan was leading again but Bekele, the pre-race favourite, surged past him with 200m to go.
But the slow early pace had played right into El Guerrouj's hands, and he had the strength in his legs to out-kick Bekele in the final few metres.
El Guerrouj came to Athens as the greatest middle distance runner in history never to take an Olympic gold.
He missed out on what seemed like certain 1500m gold in Atlanta in 1996 when he tripped, and then ran a poor tactical race in Sydney as Noah Ngeny stole gold.
But in the last week he has put those wrongs right in spectacular fashion.
Britain's John Mayock had gone out in the heats after finishing 10th.