Jemima Sumgong made the most of a kick with 6km to run to win Kenya's first ever Olympic women's marathon gold on Sunday.
Sumgong, winner of this year's London marathon, timed 2hr 24min 04sec for Kenya's first-ever women's marathon gold over the 42km-long course that finished at Rio's Sambodromo with temperatures hitting 28 degrees Celsius (82F).
"It was very hot but everybody had to get through the heat. I had to control my body and listen to my body very carefully," said Sumgong.
"I had prepared that I would move out at kilometre 35 and my body was responding very well, as well as my movement.
"I am very grateful. This is the first gold medal for Kenya (at Rio 2016)."
Sumgong makes history for Kenya. Source: Getty
Just before the finish, a group of protesters carrying banners climbed over barriers and ran onto the course before being intercepted by police on motorbikes. Runners were not disturbed by the protests.
Bahrain claimed only their second medal in any sport when Kenyan-born Eunice Kirwa took silver, 9sec adrift of Sumgong, while defending world champion Mare Dibaba of Ethiopia claimed bronze, at 26sec.
RIO 2016 LIVE: Follow all the action from Day 9
WATCH LIVE: Stream all the action from Rio on Plus7
Sumgong admitted, however, that she knew victory was hers with 2km to run, saying it made up for her disappointing showing at the 2008 Beijing Olympics.
"I was in Beijing but I was pretty disappointed that I wasn't able to win a medal or make it on the podium, but I knew one time, one day, I'd be somewhere," she said.
"I was never worried that I'd lose this. At the 40km I knew the gold was mine.
"At 35km I noticed that my other two teammates had dropped off and that gave me the motivation to carry on.
"At 40km I saw there were three of us but I knew whatever happened I couldn't lose the gold and then I knew I was on the way to history."
Dibaba, in her first race since finishing sixth at the London Marathon, had led a lead pack of seven runners through the 35km mark in 2:00.31.
But then with 6km to go, Kirwa surged, only Dibaba and Sumgang managing the pace.
Ethiopian Tirfi Tsegaye, who timed a world-leading 2:19:41 to win the Dubai Marathon at the start of the year and then finished second at the Boston Marathon, and Belarus' Volha Mazuronak became the new chase pack as Bahrain's Kenyan-born Rose Chelimo and American Shalane Flanagan were dropped.
Clocking 16:31 as their fastest 5km segment of the race, between 35km and 40km, the leaders' approach to the turning course in the final run-in to the Sambodromo put paid to Dibaba's efforts, the Ethiopian falling behind Sumgong and Kirwa.
Sumgong then turned the screw on former compatriot Kirwa down the home stretch to claim a historic gold for Kenya's women marathon runners.
For a large part of the race, there was a lead pack of 15.
Hitting the halfway mark in 1:12:56, it still consisted of 13, including the North Korean Kim twins, Hye-Song in the pink shoes, Hye-Gyong in the blue, who went on to finish 10th and 11th respectively.
Mazuronak, wearing a tight bandana, surged briefly before she was reeled in, but American Amy Cragg and Kenya's Helah Kiprop fell off the pace as the field began to split with the lead pack at seven.
Then came Kirwa's burst before Sumgong showed all her experience to power past the Bahraini for gold.