(Reuters) - Hundreds of firefighters were struggling on Saturday to contain a massive wildfire that has killed two people and burned at least 100 homes while ravaging lakeside communities in central California.

The so-called Erskine Fire, which broke out on Thursday afternoon in the foothills of Kern County about 42 miles (68 km) northeast of Bakersfield, has exploded to char more than 30,000 acres, making it one of the worst in an already intense fire season in drought-stricken California.

The National Weather Service issued a "red-flag warning" for the area at least into Saturday morning, forecasting high temperatures, low humidity and gusty winds that could whip up the blaze's intensity as it cuts through the bone-dry brush and grass.

Three firefighters have suffered injuries related to smoke inhalation while battling the inferno and hundreds of residents were forced to flee their homes. California Governor Jerry Brown on Friday declared a state of emergency for the county.

Officials said the 800 firefighters battling the blaze have been able to draw containment lines around five percent of the flames, and hundreds more personnel were en route to the area. Some 1,500 homes remain threatened, according to fire information website InciWeb.

To the south, firefighters were gaining control over a pair of fires dubbed the San Gabriel Complex burning through foothills and canyons in Los Angeles County. InciWeb said 30 percent of the 5,260 acre fire had been contained as of Friday evening.

Authorities allowed to return home more of hundreds of residents who were evacuated from the area after the fire sparked on Monday morning. Evacuation orders for other communities threatened by the flames remained in effect.

(Reporting by Curtis Skinner in San Francisco; editing by David Stamp)