BEIJING — A forest fire in southwestern China turned deadly over the weekend when winds shifted unexpectedly, trapping firefighters and local officials in a maelstrom. The bodies of 30 people who could not escape were found on Monday, officials announced, even as the fire continued to burn out of control.

Among those who died were the chief of a regional forestry bureau in Liangshan Yi Autonomous Prefecture in Sichuan Province, and his deputy, state media reported. The officials had traveled to the scene of the fire, which broke out on Saturday in a remote location at altitudes nearing 13,000 feet, and had not been heard from since.

“A huge fireball was formed in an instant,” the Ministry of Emergency Management said in a statement announcing the deaths.

The death toll appeared to be the largest for firefighters in China since a devastating blaze at a chemical plant in Tianjin killed more than 100 in 2015.