A wildfire is raging out of control in California, threatening historic gold rush communities and Yosemite National Park. The 2,000 residents of the town of Mariposa, in the Sierra Nevada mountains southwest of Yosemite, were ordered to flee as towering flames approached.

The Detwiler Fire is raging along Highway 49, a historical route winding its way up California foothills of the western Sierra Nevada dotted with communities and landmarks that sprouted up during the state's 1849 gold rush. "The fire encroaches on culturally and historically sensitive areas," Cal Fire said in a status report on Tuesday night.

The blaze is threatening at least 1,500 homes as well as power lines that provide electricity to Yosemite National Park, officials said. The park remained open on Tuesday but several roads frequented by tourists were closed. Governor Jerry Brown declared a state of emergency for Mariposa County.

"Going to bed unsure whether Mariposa, my sweet hometown, will exist when I wake up," Jennifer Paquette said on Twitter late on Tuesday.

More than 25,000 acres of forest land have been blackened, and the fire was only about five percent contained as of Tuesday afternoon, according to Cal Fire. At least 1,400 firefighters are battling the flames on the ground and from the air.

Although record rain and snowfall in the mountains this winter was celebrated for bringing California's five-year drought to its knees, it has turned into a challenge for firefighters battling flames feeding on dense vegetation, officials said. "There's ample fuel and steep terrain," said California Department of Forestry and Fire Protection spokeswoman DeeDee Garcia. "It makes firefighting difficult."

"I haven't seen these conditions in a long time, it's a wind-driven, slope-driven, fuel-driven fire," Jerry Fernandez with Cal Fire told an ABC affiliate in Fresno.

The Detwiler fire is among more than three dozen major, out-of-control wildfires burning across the US West as windy, dry conditions prompted authorities to issue evacuation orders and red flag warnings in California, Oregon and Nevada. Flames have charred more than twice as much land in California so far in 2017 compared with the same time last year, according to Cal Fire.