England's Laura Trott snatched gold from Wales rider Elinor Barker in dramatic fashion in the women's points race at the Sir Chris Hoy Veledrome.
Trott, who has been suffering from a kidney infection during the Games, had trailed Barker, 19, by a single point going into the final sprint, while Australia's Amy Cure was in third three points back.
But the 22 year old double Olympic champion won the final sprint ahead of Barker to finish level on points with her British team-mate, but finished as the winner by virtue of the last gasp effort. Katie Archibald took bronze.
"I can't believe it," Trott told BBC Radio Five Live. "I felt so bad at times in that race. I am just so glad I managed to get into that final sprint. I wouldn't say I am 100%.
"I haven't eaten properly for the last two days. I have been living off porridge and I am not even a porridge fan. This is right up there with the Olympics for me because of the way I have had to come into it after the disappointment of the last two days."
Earlier, Sophie Thornhill won her second cycling gold of the Games in the tandem time trial alongside Helen Scott in a Commonwealth record.