Cheick Sallah Cisse was the toast of the Ivory Coast as he won their first ever Olympic gold medal with a killer kick in the last second of the men's under-80kg taekwondo final.
Cisse created history for the West African country when he stunned third seed Lutalo Muhammad of Britain with a four-point score right at the death to win 8-6.
Tunisia's Oussama Oueslati and Milad Beigi Harchgani of Turkey won the bronze medals.
Ivory Coast's only previous Olympic medal was the silver won by Gabriel Tiacoh in the men's 400m at the 1984 Los Angeles Games.
Ivory Coast then got a second medal on the night when Ruth Gbagbi claimed bronze in the women's under-67kg class.
"I was able to realise this dream with courage and with passion. I don't have a lot of dreams, but this was one of them," he said afterwards.
British number one Muhammad was forlorn at coming so close to the title after taking bronze in London four years ago.
"I was a second away from my dream of being Olympic champion. I'm so sorry I don't want to cry on TV but I was so close," he told BBC straight after the fight.
He later revisited the moment when his gold dream was cruelly taken from him.
"It was the last kick, my check skimmed off and his reverse kick hit.
"It was a horrible moment when at the last second his points have gone on the board and the times run out and there's nothing you can do about it -- but hey, that's sport."
Muhammad had steamrollered into the final, ending American veteran Steven Lopez's dream of becoming the oldest ever taekwondo Olympic champion in the quarter-finals.
Reflecting om his performance the fifth seed from London borough of Walthamstow said: "I'm very happy and proud to be here, a second time Olympian, second time Olympic medallist -- a bronze, then silver, so we know what's next eh?
"I came within inches of achieving what has been a life goal for me. Of course emotions are raw. I was very sad about it. The sun will rise tomorrow. I'll get over it."
He paid tribute to Cisse, saying: "He's a very game champion, I wish him all the best, and I'll get him next time."
Before he left the arena he was asked if he would have done anything differently in the final, he thought for a second then replied simply: "Yeh - I'd have won."
In the women's under-67kg final South Korea's Oh Hy-Eri upset France's top seed Haby Niare 13-12. Gbagbi and Nur Tatar of Turkey won bronze.
A mammoth 40-match 13 hour day's action had begun in high drama with a shock defeat for second seed Aaron Cook.
The British-born player was fighting in the Olympics for the first time since Beijing 2008 after being controversially overlooked by British selectors for London 2012.
After a costly appeal -- funded in part by his parents -- failed to get him reinstated in the team Cook took dramatic action, switching nationalities to fight under the Moldovan flag.
The move was funded by Moldovan billionaire taekwondo federation president Igor Iuzefovici.
But his long circuitous route back to the Olympics came to nothing, his ambitions for gold left in tatters on the mat at Rio's Carioca Arena by Taiwan's Liu Wei-Ting.
The 25-year-old from Dorchester said: "I'm absolutely devastated -- all that hard work and sacrifice by myself and my parents, I just feel I've let everyone down," he shrugged, staring blankly into the distance.
"It didn't go right on the biggest stage and it's heartbreaking."
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)