China's sports regulating body committed to improving the safety of sporting events after 21 runners died in an ultramarathon in the country's northwestern Gansu province.

The commitment made by the General Administration of Sport came after public criticism over the gruesome deaths of the ultramarathon participants. More than 170 runners joined the 100-kilometer race Sunday. The day started with warm temperatures but then the weather suddenly turned severe.

In the middle of the race, participants were facing hail, cold temperatures and strong winds. Government officials and rescue workers blamed the deaths on the sudden drop in temperature and the lack of emergency preparations by the event's organizers. Local officials said the tragedy was a "wake-up call" for marathon organizers.

"Route planning, safety guarantees, medical preparations, emergency rescue and food supplies need to be precise and foolproof," officials said.

Marathons have recently become a popular sporting event in China as more people adopt healthier lifestyles. Some events attract thousands of participants, including first-timers and those without any prior training experience.

According to local media reports, some of those that died at the Huanghe Shilin Mountain Marathon were veteran runners - including well-known domestic marathon runners such as Liang Jing and Huang Guanjun. Liang won multiple Chinese ultramarathons, while Huang had won the men's hearing-impaired marathon at the 2019 National Paralympic Games.

Baiyin Mayor Zhang Xuchen said a section of the course was suddenly hit by bad weather. Marathon organizers and participants were reportedly not prepared for what had happened.

"In a short period of time, hailstones and ice rain suddenly fell in the local area, and there were strong winds. The temperature sharply dropped," Zhang said.

Some runners reportedly ran toward caves and other shelters to escape the hailstones. Several runners were unaccounted for when rescue workers arrived and workers had to bring in thermal-imaging drones and radar detectors to aid in the search.

Local governments had organized more than 1,200 rescue workers to search for the participants, some of which had posted videos requesting help on social media. Apart from the 21 fatalities, at least eight people were seriously injured with one in critical condition.