Hundreds of firefighters battled to protect a community in the path of a wildfire raging out of control on Friday in a mountain pass outside Los Angeles that has already forced the evacuation of 1,500 homes.

The fire, which broke out on a median of Interstate 15 in the Cajon Pass, was moving quickly toward homes in Oak Hills, where thousands of residents were under a mandatory evacuation order, authorities said.

It's basically right to the south of the community right now, threatening homes, San Bernardino National Forest fire information officer Carol Underhill said of Oak Hills, a rural enclave of 9,000 people in the foothills north of the pass.

Dramatic television images showed flames licking at the edges of large hillside properties, pouring thick black smoke into the air northeast of Los Angeles, as fire crews and water-dropping aircraft sought to turn the fire back.

Parts of neighboring Hesperia were also evacuated.

Underhill said one firefighter was injured in the so-called Hill Fire but not burned. Further details on the firefighter's condition were not immediately available.

The blaze, which erupted at about 12:30 p.m. on Friday and had charred more than 500 acres (200 hectares) of scrub brush by late afternoon, also forced closure of both sides of Interstate 15, the main artery between Southern California and Las Vegas.

Traffic was jammed for miles in both directions as Southern Californians seeking to head out of town for the Labor Day weekend found the highway shut, possibly for the night.

Underhill said officials had no estimate on when the fire might be contained.

We are encouraging people to stay out of the Cajon Pass if at all possible, if they can postpone their trip, she said. There's a lot of traffic on the 15 right now.

Underhill said 50 engines, which are each typically staffed with five firefighters, were working the fire, assisted by hand crews, water-dropping helicopters and 14 air tankers.

She said the going was tough in steep terrain and sometimes thick brush, but as of late afternoon there were no reports of damaged structures.

An evacuation shelter was set up by the Red Cross at the San Bernardino County Fairgrounds.