CGTN
Emergency workers respond to a gas explosion at a barbecue restaurant in Yinchuan, Ningxia, China, on June 21.
CNN  — 

At least 31 people are dead and seven injured in the Chinese city of Yinchuan, in northwest Ningxia region, after a gas explosion at a barbecue restaurant Wednesday night, according to state media.

The explosion was caused by a leak of a liquified gas tank inside the restaurant, and took place around 8:40 p.m., according to state broadcaster CCTV.

Among the seven injured, one person is still in critical condition. The other six are being treated in the hospital for minor injuries, burns and glass cuts.

Local fire authorities sent 20 vehicles and more than 100 personnel to the scene, with search and rescue operations lasting until 4 a.m. Thursday, according to state media.

Photos posted by state media show the damaged building, with blackened exteriors, debris on the ground and smoke in the air. Firefighters are seen entering the second floor on a ladder and lifting people out on stretchers.

Chinese leader Xi Jinping called the incident “heartbreaking,” and said it was a “profound lesson,” state broadcaster CCTV reported Thursday.

Xi added that it is imperative to treat the wounded and comfort the victims’ families, and to find out the cause of the accident as soon as possible.

He also ordered a nationwide safety risk review and strengthening of safety supervision in key sectors, CCTV reported.

Interviews by police and firefighters on the scene established that two restaurant staffers had smelled gas about an hour before the explosion, the Yinchuan government said in a statement posted online Thursday.

View this interactive content on CNN.com

The two staffers found the valve of the gas tank had broken, and sent another staff member to buy a new one, according to the statement. The explosion took place as the valve was being replaced.

The restaurant is located on a busy street, state media reported. It occurred on the eve of China’s three-day national public holiday, from Thursday to Saturday, marking the Dragon Boat Festival.

Police have detained nine people and frozen their assets, including the restaurant’s manager, employees and shareholders, local officials said Thursday.

On Chinese social media, many commentators expressed outrage over what they saw as a lack of attention to safety causing the incident.

“They smelled the gas leak an hour ago … and dared to (keep the valve) open for an hour, not evacuating the crowd at that time … It could have been avoided, and 31 people’s lives were lost in this way, which made people so angry,” read on post on China’s Twitter-like platform Weibo, that garnered more than 9,000 likes.

Some others expressed dismay that officials rush to shore up safety standards only after tragedy strikes.

At a press conference Thursday evening, Yinchuan mayor Tao Shaohua apologized and expressed his condolences over the tragedy, which he called the most serious safety accident to have taken place in Ningxia in years.

Tao detailed a raft of follow-up measures, including further investigation and holding those responsible accountable. He also announced the city would roll out a one-month campaign investigating and rectifying safety risks, focusing on areas like gas, mining, and construction, according to reports on the briefing from state media.

Regional authorities also vowed to crack down on safety violations relating to gas supply and ramp up oversight.

The accident had “exposed hidden dangers” such as the inadequate implementation of safety standards and low quality of inspection in some areas, industries and enterprises, Zhang Yupu, a leading Communist Party official for the region said at a meeting Thursday, according to state media.

“The losses are very painful, and the lessons learned are extremely profound,” he said.

The country has been rocked by a number of safety incidents this year. A coal mine collapse in Inner Mongolia in February left 53 dead; then in April, the deadliest fire to hit Beijing in two decades killed 29 people in a hospital.

On Friday, the Yinchuan city public library announced they would close, following the identification of “major safety hazards in the building” during an inspection, while they underwent “further assessment of the overall building structure and the safety quality.”

CNN’s Candice Zhu, Simone McCarthy and Wayne Chang contributed reporting.