Britain's Georgina Harland produced a superb comeback in the 3000m run to claim a modern pentathlon bronze medal.
Harland, starting the last of the five events in 14th place and 49 seconds adrift of third place, overtook 12 fellow competitors to win a medal.
But 2000 bronze medallist Kate Allenby, second after the swimming, saw her hopes fade in the showjumping.
Hungary's Zsuzsanna Voros took the gold medal with Latvia's Jelena Rublevska claiming silver, and Allenby eighth.
Harland, the world number one and European champion, appeared to have ruined her medal chances in the opening event, the shooting.
She scored just 156 points out of 200 shots, leaving her in 30th place, third from last.
"I am so chuffed, really, really chuffed," Harland said.
"This morning it was all a bit rusty but in the pentathlon you never give up.
"When things were down I just kept reminding myself my best events were still out there - the running and swimming and riding.
"You work so long for this and just to get a medal at the Olympics is a dream come true.
"There was pressure on me to get a medal and maybe I lost it a bit in the shooting at the beginning but that's me - I like to keep everyone on tenterhooks right to the end!"
Strong performances in the fencing and swimming lifted both British competitors.
Allenby was second in the fencing, winning 21 of her 31 one-minute contests against all the other competitors to move up to sixth, while Harland won 16 but was still back in 26th.
Allenby did a PB in the swimming
Voros had already moved into first place at that stage, and maintained her lead to the end.
A personal best time of 2:17.41 in the swimming section catapulted Allenby into the silver medal position, but Harland's 2:14.60 - second best overall - lifted her to 19th.
Allenby's medal hopes all but disappeared in the showjumping, in which competitors draw horses at random and have 20 minutes to get used to their mount before trying to clear 12 obstacles in a specific time.
Allenby's horse, Babar, was sluggish over the fences and she knocked down seven to pick up 196 penalty points, dropping her down to seventh.
"Kate's had a fantastic competition, it's just gutting about her horse," Harland added. "She really did nothing wrong, but that is this sport."
Harland's mount, Berbero, served her better and she hit just two fences for 56 penalty points to leave her 14th ahead of the run, her best event.
Even then though she did not have things all her own way, as she vyed with Ukrainian Viktoriya Tereshchuk.
"She is a great runner but I had pipped her in every competition this year," Harland recalled.
"But she was really fighting and cutting me off at every corner. The elbows were out but I am bigger and stronger than her and thought 'I'll have her on the last lap'."