Cannot play media. Sorry, this media is not available in your territory.
Video - Sanchez wins road race thriller
Samuel Sanchez edged a dramatic sprint finish to claim Spain's first cycling road race Olympic gold.
The 30-year-old finished the gruelling 245km race in a time of six hours, 23 minutes and 49 seconds.
Italy's Davide Rebellin celebrated his 37th birthday by winning silver while reigning world time trial champion Fabian Cancellara claimed bronze.
Pre-race favourite and 2004 Olympic champion Paolo Bettini could only finish 35 seconds behind the leaders.
The Italian was dropped on the final climb after a break by Australian Cadel Evans which also left Spain's Alejandro Valverde trailing.
Valverde and Evans ended up in a group 22 seconds down.
Sanchez finished seventh in this year's Tour de France and was the least fancied member of a Spanish team which included two Tour de France winners and a triple world champion.
I was struggling with my breathing all the way up the climb
Great Britain's Jonny Bellis
"It's like a dream, I still can't believe I've just won the gold medal," he said. "The heat and humidity were extreme."
The race was run in brutal conditions, with temperatures of 26C and humidity at 90%, leading to 53 of the 143-strong field, such as Spain's 2007 Tour de France winner Alberto Contador and Jens Voigt of Germany, failing to finish.
The British quartet of Steve Cummings, Roger Hammond, Ben Swift and Jonny Bellis also pulled out before the end.
"Today's the hottest day since we've been here. It was warm and humid and difficult to breathe," said Bellis.
"From the go I wasn't feeling good. You know if it's going to be a good day or a bad day, and I knew on the climb that today it wasn't going to happen. I was struggling with my breathing all the way up the climb.
"The wind was quite strong, with a tail wind going up and a head wind going down, there wasn't much room for recovery. It was up and down all the time and there was no place to rest."
And Hammond added: "A lot of big names have been struggling and have stopped.
"It's totally different to racing in Europe. In Europe you get pain in the legs, here it is the heat and humidity."
Austrian Christian Pfannberger had launched a brave solo attack with 40km to go but by the time he reached the start of the final 23.8km hilly loop, his lead was only 20 seconds.
His advantage had completely disappeared by the time the riders began the final 9km ascent.
Evans then made his charge before Luxembourg's Andy Schleck, Rebellin, Michael Rogers, Russian Alexander Kolobnev and Sanchez went off on their own.
Rogers and Kolobnev fell back but after Cancellara emerged from Evans' group with a searing attack, the trio caught the three leaders with just one kilometre to go.
And with just 250 metres left, Sanchez produced the turn of pace which saw him claim the biggest win of his career.