The largest wildfire on record in California has been declared contained, days after mud on the coastal mountain slopes it scorched crashed down on homes during a storm, killing at least 18 people. The Thomas fire was declared 100 per cent surrounded after ravaging Ventura and Santa Barbara counties northwest of Los Angeles for more than a month. A cause has not yet been determined. Some areas of Los Padres National Forest remain closed to the public until authorities determine it is safe to enter. The blaze began on December 4 and fierce winds drove the flames through tinder-dry brush, chaparral and trees. The fire blackened 1,140.76 square kms - an area nearly as large as Los Angeles. Flames whipped through foothill communities and forest wilderness. More than 1,000 buildings, including many homes, were incinerated and thousands of people were forced to flee. Evacuations were called for Montecito as flames topped ridges above the wealthy enclave that was hit by waves of mud on Tuesday. Two people were killed in the fire. Cory Iverson, a 32-year-old state firefighter, died of burns and smoke inhalation while working in steep country above Fillmore. A preliminary state fire report said Iverson was laying hose line near a firebreak cut by bulldozers when he became surrounded by spot fires that exploded around him and cut off his retreat. Four other members of his team managed to escape. Some Montecito families had only recently returned home when another evacuation call went out on Monday. Forecasters warned that the approaching storm could unleash flooding and mudslides because fire-scorched areas had lost vegetation that stabilises soil. Cascades of mud, boulders, trees and other debris inundated the community, destroying at least 100 homes.