• Muir finishes fourth in thrilling race won by Kenya’s Faith Kipyegon • Semenya pounced so late for third that Muir did not have time to respond

It speaks volumes about Laura Muir’s resilience that she refused to curl up and cry after what was surely the toughest defeat of her career. But when she looks back on an epic world championship 1500m final she might reflect that, not for the first time, she left a major medal slip away.

Muir had looked odds on to claim her first global outdoor medal in front of an adoring home crowd until the last few metres when first the American Jenny Simpson passed her to claim silver – and then, swooping from the gods, Caster Semenya followed suit.

The gap between Muir and a bronze medal was 0.07sec. Everyone knows that sport can be cruel. But this, following on from Muir’s defeats at her home Commonwealth Games in Glasgow and the Rio Olympics, was sadistic.

“I don’t know,” said Muir, shaking her head in shock. “It’s fourth, isn’t it? I gave it everything I could but the last 50m I just tied up and they flew past me. I knew it was close. It happened so late in the race I couldn’t react.

She tried to search for the positives, insisting: “But I’m making huge steps each time. I think there is a lot more I can do.”

Kenya’s Faith Kipyegon took gold in 4:02.59 – just – with the next three athletes separated by less than half a second. “I knew it would be fast. It is such a quality field,” said Kipyegon. “The best was going to win here. It was always going to be quick and competitive.”

Britain’s Laura Weightman ran a superb tactical race to finish sixth, with the defending champion, Genzebe Dibaba, last.

No doubt Muir will pick herself up. After finishing seventh at the Rio Olympics, for instance, she responded by setting five British records and two European records and claiming two European Indoors championship gold medals. But on Monday night the pain remained raw. “I could tell Caster was a fraction ahead of me but there was nothing I could do about it,” she lamented, softly and sadly.

Shortly afterwards Muir was also asked the inevitable question: whether Semenya, who is an intersex athlete, should have been in the race. Understandably she did not want to talk about it. She knew she would be damned whatever she said. No one disputes that Semenya is a hugely talented athlete and an impressive ambassador for her sport – or that she faces often unpleasant allegations and insinuations about her gender.

But then it gets messy. And the argument continues to rage over whether, having reportedly been born with no womb or ovaries but internal testes, it is fair to allow Semenya a massive advantage over her rivals due to her high testosterone levels.

The IAAF, athletics’ governing body, believes it is not – and from 2009 to 2016 made her take testosterone suppressing medication to level the playing field. However the Court of Arbitration for Sport recently overruled that the IAAF could no longer do that any more – a decision the sport hopes to reverse.

Whatever the arguments, Semenya’s appearance on the start line meant that the 1500m runners knew they had to find a way to take the reigning Olympic 800m champion out of her comfort zone.

Muir’s plan was to go out hard for the first lap, trying to making it an honest race, before easing back the throttle on the second to conserve her energy. However, it seemed a strange move given it allowed the field to bunch back up again. It was now becoming a high-stakes game of poker. The 1500m specialists knew they had to take the finishing kick out of Semenya but none of them wanted to strike too early.

Then with 650m remaining the race exploded. Sifan Hassan – the Dutch athlete who has been so impressive since joining Mo Farah’s coach this year – went for broke. The chase was on. Kipyegon immediately was on Hassan’s back. Muir seemed to get a little bit lost in the traffic and had to use some of her petrol to get back into contention at the bell. Simpson was further back, with Semenya even further behind. By now the race had an increasingly chaotic and epic. Hassan and Kipyegon were going so hard their pace seemed impossible to sustain.

It was. As Hassan slipped back Kipyegon struck for gold. Muir did the same – but, having started her finishing kick a touch too early as she chased gold, was running on empty too. And Simpson, who had been thrashed by Muir over a mile in this stadium last month, pounced – along with Semenya.

Afterwards Simpson insisted she did not want to criticise any of her fellow athletes. But, when asked about Muir’s tactics, she reflected on the value of experience. “This was my 17th race at a world championships,” she said, “and with this comes 17 different ways to learn how to make really good decisions in the race.” The good news for Muir is that, at 24, at least she still has time on her side.