A long-distance runner has been killed by lightning as he was about to cross the finish line for a 50km race in the US.

Thomas Stanley, 33, was less than half a kilometre from finishing the FlatRock trail race at Elk City State Park, Kansas, when he was struck on Saturday, said race director Carolyn Robinson.

She said the day started off hot and sunny before a small storm hit the area about 150 miles south west of Kansas City “without warning”.

Ms Robinson said Mr Stanley was struck “the moment the storm blew in”.

Our hearts are with Ashley and the Stanley family.Thomas Stanley tragically passed away when he was struck by…

Posted by FlatRock 50K & 25K on Sunday, September 29, 2019

While some racers, including a doctor, attempted CPR, others in the crowd jumped in their vehicles and drove to a straight stretch of road that leads to the finish line, so other runners could get inside and out of the storm, she said.

“A lot of the participants who were there tending to him are having a very hard time dealing with this loss,” she said. “They did everything they could.”

Race organisers said in a Facebook post that Mr Stanley was included as a finisher in the final results because, although he did not cross the finish line, he completed the full distance. The results show he came 11th out of 104 competitors.

Ms Robinson said his wife was presented the finisher award he would have received. The couple had three children, the oldest aged six, and Ms Robinson said they are “devastated”.

His family described him in a statement as a “devoted husband, father and friend”.

One of his friends, Ben Davis, 35, of Wichita, described Mr Stanley as a “running evangelist” who had previously run at least two 100-mile events. Mr Davis ran alongside him to provide support for parts of those races.

“He loved the endurance challenge of overcoming the difficulty it would take on you,” Mr Davis said.

He said Mr Stanley would prepare by running through the night and then going to work the next day on no sleep.

He worked for the non-profit Kansas Leadership Centre. Mr Davis said he focused on interfaith leadership development, teaching people to use their influence “no matter how big or how small, to help others”.