Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A London marathon runner is being praised for embodying the spirit of sportsmanship after he offered a helping hand to another exhausted athlete struggling to cross the finish line.

Matt Rees, a member of the Swansea Harriers Athletics Club, rounded mile 26 of the race with David Wyeth, of Chorlton Runners, leaning on his shoulder. Video of the race shows the two passing by Buckingham Palace before reaching the finish line, with England's Prince William and others in the crowd cheering.

This is exactly what the #LondonMarathon is all about pic.twitter.com/fRhkzMflB5 — London Marathon (@LondonMarathon) April 23, 2017

Rees said he saw Wyeth lying on the ground and unable to stand up, so he placed Wyeth's arm around his neck and urged him to continue.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I thought 'A few seconds to me means nothing, this guy needs my help," the 29-year-old told NBC News. "I told him the finish line was close... The crowd was incredible, they were all cheering us."

After the race, Rees said Wyeth received medical attention. The two runners spoke again on the phone hours later, and Reese said he's glad to know Wyeth is "doing okay" now.

"He was really dehydrated. His legs had properly gone to jelly. You could tell from his facial expression that he wasn't completely coherent," Rees said.

London Marathon runner Matt Rees helps fellow participant David Wyeth to cross the finish line, April 23, 2017. Virgin Money London Marathon

Rees picked up the sport in 2015 as part of his new year's resolution to "get a bit fitter." He ran the London marathon in 2016 for the first time and finished in two hours and 29 minutes. His time this year was two hours and 52 minutes.

For Rees, the viral moment at this year's race encompasses the camaraderie of the running community and the London marathon.

"Throughout the course, I saw other people helping each other. It's just that mine was caught on camera," he said.

Marathon officials shared this sentiment on Twitter, writing, "You've just encompassed everything that's so special about the #LondonMarathon. We salute you."

Both running clubs applauded the two athletes as well.

Chorlton Runners, based in Manchester, thanked Reese on Twitter for helping Wyeth finish the race, while the Swansea Harriers wrote: "[Rees] is an inspiration! It's been a wonderful day for the club."

A record number of runners took part in this year's marathon, with 40,000 athletes kicking off the event in Greenwich Park in London.