The massive Brian Head wildfire in southern Utah this summer uncovered scattered underground bunkers stocked with guns, grenades and food that were illegally built in the wilderness by a survivalist, authorities say.

The remains of a cabin with an explosive-filled bunker nearby found during the Brian Head fire in Utah in summer 2017. (Iron County, Utah, Sheriff’s Office)

The remains of a cabin with an explosive-filled bunker nearby found during the Brian Head fire in Utah in summer 2017. (Iron County, Utah, Sheriff’s Office)

Cleanup of remains of cabins and explosive-filled bunkers found during the Brian Head fire in Utah in summer 2017. (Iron County, Utah, Sheriff’s Office)

Explosive-filled bunker found during the Brian Head fire in Utah in summer 2017. (Iron County, Utah, Sheriff’s Office)

Explosive-filled bunker found during the Brian Head fire in Utah in summer 2017. (Iron County, Utah, Sheriff’s Office)

Ammunition cache found during the Brian Head fire in Utah in summer 2017. (Iron County, Utah, Sheriff’s Office)

Smoke rises behind vegetation in Dixie National Forest off State Route 143 in southern Utah on Tuesday, June 27, 2017. (Bridget Bennett/Las Vegas Review-Journal) @bridgetkbennett

Burt vegetation is seen from a point east of where the fire started at Brian Head, Utah, in Dixie National Forest a few miles off State Route 143 on Tuesday, June 27, 2017. (Bridget Bennett Las Vegas Review-Journal @bridgetkbennett)

Burned vegetation is seen from a point east of where the fire started at Brian Head, Utah, in Dixie National Forest a few miles off State Route 143 on Tuesday, June 27, 2017. (Bridget Bennett/Las Vegas Review-Journal) @bridgetkbennett

Smoke rises as logs smolder in Dixie National Forest off State Route 143 on Tuesday, June 27, 2017. Bridget Bennett Las Vegas Review-Journal @bridgetkbennett

A stump smolders an area in Dixie National Forest off State Route 143 in southern Utah on Tuesday, June 27, 2017. (Bridget Bennett/Las Vegas Review-Journal) @bridgetkbennett

A firefighter pauses between cutting burned trees in an area in Dixie National Forest off State Route 143 in southern Utah on Tuesday, June 27, 2017. (Bridget Bennett/Las Vegas Review-Journal) @bridgetkbennett

SALT LAKE CITY — A massive wildfire in Southern Utah this summer uncovered scattered underground bunkers stocked with guns, grenades and food that were illegally built in the wilderness, authorities said Thursday.

The Iron County Sheriff’s Office did not identify the builder of the bunkers or his motivation.

The sheriff’s office said in a statement that it has been investigating since the late June fire, and prosecutors will consider filing criminal charges against the man because the bunkers were illegally constructed on government land.

The hideouts were discovered on June 27, when firefighters near the ski resort town of Brian Head heard the popping sound of ammunition exploding.

They discovered a burned cabin and nearby bunker filled with ammunition, food, explosive powder and dozens of toy grenades that had been altered with pipe fittings.

A bomb squad investigated and authorities located a man who lives in the town of Parowan about 20 minutes away, who acknowledged building the bunker and stocking the cabin.

He also told investigators he had seven or eight similar hideouts in the area that he’d built over several years.

The sheriff’s office said the suspect is cooperating.

The sheriff’s office said deputies, along with investigators from the FBI and other agencies, located and dismantled the bunkers and removed the items and ammunition. Authorities had to use helicopters to reach the remote locations.

Authorities said the wildfire, which destroyed 13 homes and cost some $40 million to fight, was sparked by a 61-year-old man burning weeds. He’s facing charges for reckless burning and burning without a permit.