(Reuters) - Firefighters battled on Wednesday to gain control of two wildfires burning across drought-parched foothills northeast of Los Angeles, though authorities lifted some evacuation orders as crews created a buffer around previously threatened homes.

Residents of 534 homes in the city of Duarte, on the outskirts of Los Angeles, were beginning to return on Wednesday, according to U.S. Forest Service spokesman Nathan Judy. A total of 858 homes were initially evacuated, according to fire information website InciWeb.

"The flames burned through all available vegetation and fire crews created a buffer zone behind those residences in those areas," Judy said.

The fire is one of two that make up the so-called San Gabriel Complex that has charred about 4,900 acres (1,983 hectares) in the foothills of the San Gabriel Mountains, the Forest Service said.

Just 15 percent of the fires, which started a few miles apart early on Monday, have been contained, as the flames have been propelled by bone-dry chaparral and severe heat.

No property losses or serious injuries were reported.

While the cause of the fires has not been determined, some 95 percent of wildfires that burn through tangled, thorny chaparral vegetation in California are caused by humans, the Forest Service said.

On Wednesday, state fire officials said that more than 5,000 firefighters were battling four large wildfires across California.

"Extreme temperatures and low humidity continue to heighten the fire risk statewide," Cal Fire said in a statement.

To the south, firefighters managed to slow the spread of a massive fire near the Mexican border town of Potrero, prompting officials to lift some evacuation orders. Fire officials said some 200 structures remained under threat, down from about 1,000 earlier in the day.

That fire, about 50 miles (80 km) southeast of San Diego, has blackened more than 6,700 acres - growing by about 500 acres from Tuesday - and was 20 percent contained by Wednesday night, Cal Fire Captain Kendal Bortisser said.

Still, Bortisser warned in a statement that the fire remained active and dynamic, adding that residents should be ready to evacuate again if necessary.

(Reporting by Laila Kearney in New York, Eric M. Johnson in Seattle and Curtis Skinner in San Francisco; Editing by Alan Crosby and Simon Cameron-Moore)