SAINT QUENTIN-EN-YVELINES, France (Reuters) - There is never a good time to fall off your bike but 23 laps from the end of an Olympic omnium points race decider with a gold medal on the line looked like being curtains for Frenchman Benjamin Thomas at the National Velodrome on Thursday.
Instead, the 28-year-old picked himself up, checked that he and his machine were still intact, and then rode a wave of noise to the finishing line for a spine-tingling victory.
Thomas, twice world champion in the multi-event discipline which offers the ultimate test of stamina and strategy, edged out Portugal's Iuri Leitao to deliver France's first track cycling medal of the Games.
"That was a crazy race today. I don't believe the medal is around my neck," Thomas, who finished an agonising fourth in Tokyo three years ago said after shedding tears on the podium.
Shortly before Thomas's victory ride almost took the roof off the velodrome, Ellesse Andrews earned New Zealand's first track cycling gold for 20 years and only second ever as she beat a quality field to win the women's keirin final.
Andrews, the world champion in the event which is initially paced by an electric motorcycle before a three-lap thrash, held off Briton Emma Finucane around the last lap to win comfortably.
The 21-year-old Finucane, who had been tipped for a second gold after winning the team sprint on Monday, ended up in third place behind Dutch rider Hetty van de Wouw.
Netherlands' powerhouse Harrie Lavreysen continued his relentless march towards what looks like a certain gold in the men's sprint as he cruised into Friday's semi-finals.
There was some good fortune for Britain's Jack Carlin as he was spared elimination in the quarter-finals when Japan's Kaiya Ota appeared to have taken a 2-0 lead in the best-of-three heat but was relegated after the judged deemed he had made dangerous move. Carlin, a bronze medallist in Tokyo, then won the decider.
The Briton will have to find a way of beating reigning champion Lavreysen though on Friday if he is to keep alive his hopes of a first Olympic gold medal.
MEMORABLE GAMES
There was initial disappointment for the French crowd when sprinter Mathilde Gros failed to make the keirin final.
But Thomas gave them what they wanted -- delivering France's 14th gold medal from a memorable Games.
With four separate endurance races squeezed into three hours, the omnium is a frenetic competition that leaves the heads of commentators, judges and fans spinning as they try to follow the complex scoring system.
Thomas won the 40-lap scratch race, was solid in the tempo race and elimination races, meaning he went in to the 100-lap points race second on the leaderboard.
Roared on by the crowd he attacked and picked up 40 points for twice lapping the field, as did Leitao, and kept the points ticking in the sprints after every 10 laps.
But all looked doomed when he lost control and crashed on the boards, having just moved to the top of the leaderboard.
There was no panic though as he rejoined, as the rules permit, and did enough in the remaining laps to stay top, shadowing Leitao's attempted late break to finish with 164 points to the Portuguese rider's 153 with Belgium's Fabio van den Bossche taking bronze with 131 points.
"The noise of the crowd made me forget the pain with the adrenaline and everything," Thomas, whose skinsuit looked decidedly second hand, said.
"It's so crazy. You'll never live this again. I was watching six laps, five laps, four laps to go and the last three I could enjoy."
Leitao was also in tears at the end after claiming Portugal's first-ever Olympic track cycling medal.
(Reporting by Martyn Herman; Editing by Ken Ferris and Ed Osmond)