It’s every Olympian’s nightmare. You train for four years to compete to your very best, then an accident happens which could take it all away.

And so it was for 5,000m runners Nikki Hamblin and Abbey D’Agostino when both athletes crashed to the ground during the Olympic semi-final in Rio.

Hamblin, representing New Zealand, fell at around the 3,000m mark, causing D’Agostino of the USA to plough into the back of her. Both women fell to the floor, and it seemed to all be over.

(Matt Dunham/AP)

However, the women had other plans. D’Agostino got to her feet and encouraged her rival to do so too, only in her haste to get up, it became obvious she was suffering from an injury.

As Hamblin rejoined the race, D’Agostino mustered her willpower to continue, eventually finishing with a time of 17:10.02.

(David J. Phillip/AP)

D’Agostino was met at the finish line by Hamblin, who embraced her.

The internet was awash with praise for the pair, saying they embodied the Olympic spirit.

Wonderful moment of sportsmanship from Kiwi Nikki Hamblin, who tripped up and then waited for American Abbey D'Agostino during 5000m heat

— Daniel Cherny (@DanielCherny) August 16, 2016

I'm crying over Nikki Hamblin and Abbey D'Agostino, you guys, THEY ARE SUCH BEAUTIFUL HUMAN BEINGS

— Erin (@reblogginhood) August 16, 2016

Remarkable performance by Nikki Hamblin and Abbey D'Agostino in #Rio2016 Very moving.

— donna carlsson (@donna_carlsson) August 16, 2016

The epitome of determination, class, and sportsmanship from Abbey D'Agostino, way to represent your state and country with great pride!

— Caitlin Clary (@Caitlinc13) August 16, 2016

Even Paula Radcliffe got involved.

Great sportswomanship. D'Agostino checks Hamblin OK, Hamblin encourages D'Agostino to finish thru pain-Both advanced

— Paula Radcliffe (@paulajradcliffe) August 16, 2016

It wasn’t all bad news for the pair. Despite finishing last, both athletes were given places in the final. Whether D’Agostino will be fit to compete will depend on the results of an MRI she is receiving, after being escorted from the stadium in a wheelchair by volunteers.

(Martin Meissner/AP)

@NBCOlympics @abbey_dags @NikkiHamblin wow. This is why I watch the Olympics. Better than a medal.

— Aviva (@LexyCohenNYC) August 16, 2016