Australian Chloe Esposito has won gold in the women's individual modern pentathlon. This is Australia's first ever Olympic medal in modern pentathlon.
Esposito had a 45 second time handicap to begin the final event, the combined 3200m run and shoot.
She considers this her best event and she proved to be a quick and accurate shot, only missing one target, at the shooting ranges and overtook Poland's Oktawia Nowacka.
Esposito finished in sixth place overall after the fencing bonus round and jumped two spots into fourth heading into the final event.
"I knew this day was going to come when everything came together," Esposito told the AP in Rio. "Today was the day and I'm so thankful it was today."
The pentathlon has been a big part of Esposito's family. Her father competed at the 1984 Games for Australia and her brother Max will compete in the men's individual on August 20.
Elodie Clouvel of France finished second and Nowacka, who was atop the leaderboard throughout the day, finshed third.
This the first pentathlon medal for France since 1984 and for Poland since 1992.
It was a disappointing end for defending gold medalist Laura Asadauskaite who finished 31st.
Asadauskaite was trying to become the first women to successfully defend her title but she accrued too many faults in the horse jumping event and received no points.
This proved to be the fatal blow for a repeat performance.
Germany's Lena Schoneborn, who finished third at the World Championships in 2016, was viewed as the favorite to win gold.
She had been in fourth place before she too was eliminated in the horse jumping event and finished just one spot behind Asadauskaite.
Team USA's Margaux Isaksen finished 20th and her sister Isabella, in her first Olympic appearance, finished in 25th.