Twenty-one people have died after hail, freezing rain and high winds hit runners taking part in a 100km cross-country mountain race in China, according to state media reports, sparking public outrage over the lack of contingency planning.

The extreme weather struck a high-altitude section of the race held in the scenic Yellow River Stone Forest near Baiyin city in northwestern Gansu province yesterday afternoon.

Among the dead were elite Chinese long-distance runners, local media reported.

Official news agency Xinhua confirmed the death toll had risen to 21, citing the local rescue command headquarters. State broadcaster CCTV also reported the final missing competitor had been found dead.

Baiyin city mayor Zhang Xuchen said that at around midday yesterday a section of the rugged ultramarathon course - between kilometres 20 and 31 - was "suddenly affected by disastrous weather".

"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," Mr Zhang said.

Shortly after receiving messages seeking help from some participants, marathon organisers dispatched a rescue team that managed to save 18 of the 172 participants.

At around 2pm, weather conditions worsened and the race was immediately called off as local authorities sent more rescuers to help, Mr Zhang said.

The victims included top domestic marathon runners Liang Jing and Huang Guanjun, local media reported, citing a friend of Huang's and Wei Pulong, Liang's coach. Liang had won multiple Chinese ultramarathons in recent years.

Mr Huang, who was deaf-mute, won the men's hearing-impaired marathon at the 2019 National Paralympic Games held in Tianjin. Marathon organisers confirmed his death to a friend, who was cited in local media.

Rescuers carrying equipment as they search for runners who were competing in the race

"As the event's organiser, we feel a deep sense of guilt and self-blame, express our deep mourning for the victims and deep condolences to their families and the injured runners," Mr Zhang said, as he and other local officials bowed.

The race, backed by the Baiyin city government and the Chinese Athletic Association, has been held for four successive years.

Xinhua reported that some of the runners suffered from hypothermia, and Mr Zhang said earlier that eight people were being treated for minor injuries in hospital and were in a stable condition.

Video footage broadcast on state media showed emergency rescue personnel in combat fatigues carrying flashlights as they climbed through the rocky terrain at night.

Some marathon participants, wrapped in heavy-duty blankets, were filmed being put on to a stretcher by rescuers.

Photos published by Chinese media also showed a group of runners huddled together on the mountainside, some wrapped in insulation blankets.

"My whole body was soaked through, including my shoes and socks. I couldn't stand up straight because of the wind, I was very worried I'd be blown over. The cold became more and more unbearable," one survivor was quoted as saying in local media.

"While descending the mountain, I was already experiencing hypothermia symptoms."

Screenshots of messages sent in the race participants' chat group were published in local media.

"A few people have already lost consciousness and are foaming at the mouth," wrote one unidentified participant. "Come and save us, quick!"

Chinese social media erupted in mourning and outrage afterward, as users blamed organisers for perceived failings in contingency planning.

"The local organisers have an inescapable responsibility for the bad weather in the marathon! Current weather forecast accuracy rates are very high ... what kind of emergency plans did they have?" wrote one user.

Meteorological authorities in Gansu's Jingtai county told local media they had sent a weather report to race organisers but it "contained no details of a cold air front".

Gansu Meteorological Bureau warned of "sudden heavy showers, hail, lightning, sudden gale-force winds" and other adverse weather conditions across the province in a report dated Friday.

Provincial authorities have set up an investigation team to look into the cause of the incident, Mr Zhang said.

Repeated calls to Baiyin city propaganda department were not answered.

Gansu, one of China's poorest regions, borders Mongolia to the north and Xinjiang to the west.

Deadly floods and landslides have hit the province in the past, with mudslides reportedly killing more than 1,000 people in one town in 2010.

Marathons have seen a surge in popularity among China's middle class in recent years.

However, the sport has often been plagued by cheating scandals in China.