Image caption Thousands of firefighters are still battling the blaze

A California wildfire that has burnt almost 371 sq miles (960 sq km) was ignited when a hunter's illegal campfire went out of control, investigators have said.

The US Forest Service dismissed speculation the fire was started by illegal marijuana growers.

The blaze began on 17 August outside Yosemite National Park and is now 80% contained.

No arrests have been made and the hunter's name is not being released.

Further investigation continues, the US Forest Service said in a statement.

The Rim Fire, named for a scenic overlook in Stanislaus National Forest near the fire's origin called the Rim of the World, is the fourth largest wildfire in California since 1932.

It has burned more than 66,000 acres (27,000 ha) of world-famous Yosemite National Park and threatened to fill with ash a park reservoir that supplies water and hydro-electric power to San Francisco. The park's main tourist area has remained open.

Officials said 111 structures had been destroyed by the blaze. At one point, more than 4,000 structures were threatened and thousands were ordered to evacuate.

Thousands of firefighters are still fighting the wildfire, but significant progress has been made in the past week.