A long-distance trail runner competing in a weekend race in Kansas died after being struck by lightning near the finish line, race organizers said.

Thomas Stanley, 33, was approaching the end of the Flatrock 50K near Independence, Kansas, on Saturday when the strike occurred, the organizers said on Facebook.

In an email, race director Carolyn Robinson described Stanley as an avid runner who was well known in the local racing community.

The Flatrock 50K began on a hot and sunny day, NBC affiliate KSNW reported. Robinson told the station that organizers got word of a fast-moving storm just moments before it hit.

“It was moments after that that we got word that a participant had been struck by lightning,” she told the station.

Other runners administered chest compression but Stanley didn't survive, the station reported.

“Thomas' family says that the chances of being killed by a lightning strike are about one in a million, and Thomas was truly a one-in-a-million guy,” race organizers said in a Facebook post.

A separate post said Stanley was added to the race’s results as having completed the race even though he didn’t cross the finish line.

The race, which was launched 25 years ago, was the state’s first ultra-trail race and follows a rugged path along the Elk River Hiking Trail.

Stanley had completed the race's off-road sections and was running on a paved section when he was killed, according to KSNW.