Great Britain's Ed Clancy produced a blistering final ride to claim a bronze medal in the omnium.
Clancy had to win the sixth event of the multi-discipline challenge to have a chance of a medal, and he delivered.
Omnium tough after pursuit - Clancy
In fifth place coming into the 1km time trial, he went a huge 1.333 seconds quicker than Lasse Norman Hansen.
But the 20-year-old Dane was more consistent throughout the competition and finished a worthy winner. France's Bryan Coquard took silver.
"I always knew it would be touch-and-go to win a medal and it's an emotional rollercoaster out there," said Clancy.
"At one point I thought I was on for the gold, but that just slipped away."
The omnium is a new addition to the Olympics and it effectively replaces three events that were cleared away to make room for more women's events.
The scrapped events were the individual pursuit, the madison and the points races, but the individual pursuit and points race are now two of the omnium's six disciplines.
The other four are two timed events - the kilo and the flying lap - and two types of distance race, and it is in the latter where Clancy lost ground to Hansen and Coquard, who finished just one point ahead of the Yorkshireman.
2012 track cycling golds
Britain have won seven out of 10 track cycling gold medals at the London 2012 Olympics
With one point awarded to the first-placed rider in each event, two points to the second and so on, Clancy's 10th and 11th places in the scratch and points races were the difference in this competition.
"I was in the form of my life - the kilo, the pursuit, the flying lap - I had a personal best in all of them," the 27-year-old said.
"It's just a shame that in the bunch races I got torn apart by the specialists.
"One minute you are winning, the next you are completely out of the race. And that was the story of the past two days."
Clancy's 1km time-trial finale was particularly impressive as his time of 1min 00.981sec was only two tenths off the Olympic record set by kilo specialist Sir Chris Hoy in Athens when it was last in the Games schedule in 2004.
With rumours of an Olympic return for the kilo in 2016, Clancy can look forward to Rio with relish.
In the meantime he can be proud of the omnium bronze, as well as the team pursuit gold he retained on Friday after victory in 2008 in Beijing.
Hansen should also be very proud of what he has just achieved. He won the bronze medal at the World Championships in April and has clearly grown into a rider of real class and versatility.
Mark Cavendish's analysis
"The omnium is all about consistency. Ed Clancy won two events and came second in another, while Hansen won just one event out of six but was consistent throughout all the events. I am really, really proud of Ed though."
He is also very brave, as he demonstrated when he crashed in the penultimate scratch race, only to call for a new bike and immediately launch a solo attack that put four points between himself and Clancy.
With only three points between the first three riders, it was this effort that proved decisive, something the crowd acknowledged with generous applause.
Clancy's second medal means Team GB have secured four golds and a bronze from six events in the velodrome, and have realistic gold-medal hopes in the four events still to be decided.