Britain's Jessica Ennis had to settle for silver as Olympic champion Nataliya Dobrynska of Ukraine won the pentathlon at the World Indoor Championships.
Ennis thought she had done enough when official scoring suggested she had won gold after winning the closing 800m.
But her celebrations were quickly cut short when it was confirmed that Dobrynska had broken the world record.
"It's the worst feeling in the world," Ennis said of initially seeing her name in first place on the scoreboard.
The 26-year-old needed to beat Dobrynska by a sizeable margin in the final event to retain her world indoor title.
But the Ukrainian managed to finish within three seconds of Ennis, who ran a personal best for the 800m, and set a new pentathlon world best of 5,013 points, ahead of Ennis on 4,965 points and Lithuanian Austra Skujyte on 4,802.
"I just had to run my heart out," said Ennis. "My plan was to stay with [Karolina] Tyminska and I did that, and just literally glanced up and saw my name in first position and thought I've won it, and [then had] the excitement and then obviously the devastation to know I was second.
"Dobrynska has the knack of staying below par but being brilliant in Olympic year, coming out and breaking world records and winning gold medals. She's in great form."
Ennis began the day in Istanbul with a brilliant run in the hurdles, dominating the field to win in 7.91s, but flirted with failure in the high jump until clearing 1.87m at her third and final attempt.
The Sheffield athlete responded with a shot put of 14.79m - the furthest she has thrown, indoors or out - to lead by 10 points overall heading into the long jump.
But, after an opening leap of 6.19m, Ennis followed up with 6.18m before being shown a red flag for overstepping the board on her final effort.
"I'm absolutely gutted; it was a terrible long jump," she said, knowing that she had left herself a huge task in the 800m.
Russia's world heptathlon champion Tatyana Chernova had an even more disappointing day, finishing tied four fourth place with Poland's Tyminska.
Elsewhere, reigning 60m champion Dwain Chambers progressed comfortably in the heats, as did fellow Briton Mo Farah in the 3,000m.
Chambers won his opening round in 6.64 seconds, matching the time of American Justin Gatlin in the previous race, and said: "It's nice to get the first heat out of the way."
Farah had to put in a sprint around the final bend of his heat with only the top four making the final, but in the end he came through in second ahead of American rival Bernard Lagat.
"I had to dig in hard," said the Londoner. "My aim was to slowly wind it up and try to get rid of as many people as possible. It's all about the final and trying to save as much energy as I can."
Britain had enjoyed an impressive start to day one, with Yamile Aldama making Saturday's triple jump final in the first round of qualifying with 14.62m - the third longest indoor jump of the year.
European indoor 3,000m champion Helen Clitheroe qualified for the 3,000m final as fastest loser in 9.02:27. She said: "It's always a massive relief to get through the heats, I'm pleased. I wanted to make sure I was in the first four or, if it was a fast time, get through as a fastest qualifier."
Joe Thomas and Andrew Osagie qualified for the 800m semi-final, both running 1.49:73.
Shana Cox made it through to the 400m final by winning her semi-final in 52.69 seconds but Nadine Okyere went out with a fourth-placed finish in her semi. American Sanya Richards-Ross set the fastest qualifying time of 50.99 seconds.
There will be no British representation in the men's 400m final after Richard Buck and Nigel Levine finished third in their semi-finals, but world outdoor champion Kirani James of Grenada progressed.
Australian 60m hurdles star Sally Pearson looked imperious as she won her heat in 7.41 seconds but Kristi Castlin, ranked number one in the world last year, went out in controversial circumstances.
The American was one of several athletes during the day to incorrectly think there had been a false start, with Jamaican sprinter Lerone Clarke another to make an early exit before complaining about the starter's gun.