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.

Detwiler fire Mariposa Yosemite California
Firefighters watch approaching flames as the Detwiler fire rages on near the town of MariposaJosh Edelson/AFP
Detwiler fire Mariposa Yosemite California
The Cal Fire Strike team leader holds a meeting at Shilling Ranch after authorities ordered evacuations due to the Detwiler fireAl Golub/Reuters
Detwiler fire Mariposa Yosemite California
The Detwiler fire burns in the hills above the town of MariposaJustin Sullivan/Getty Images

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.

Detwiler fire Mariposa Yosemite California
Main street in Mariposa after authorities ordered evacuations due to the Detwiler fireAl Golub/Reuters
Detwiler fire
Flames from the Detwiler fire burn on a hill near the John C Fremont Hospital in MariposaStephen Lam/Reuters
Detwiler fire Mariposa Yosemite California
A real estate sign is surrounded by flames as the Detwiler fire rages on near the town of MariposaJosh Edelson/AFP
Detwiler fire Mariposa Yosemite California
With the grass stained pink by fire retardant in the foreground, fire blows up on the north side of the Merced River near MariposaAl Golub/Reuters
Detwiler fire Mariposa Yosemite California
A firefighter monitors the Detwiler fire on the outskirts of MariposaJustin Sullivan/Getty Images
Detwiler fire Mariposa Yosemite California
Firefighters spray water on the Detwiler fire along a road leading into MariposaJustin Sullivan/Getty Images
Detwiler fire Mariposa Yosemite California
A firefighter tackles flames as the Detwiler fire rages near the town of MariposaJosh Edelson/AFP
Detwiler fire Mariposa Yosemite California
A Cal Fire bulldozer makes a safety zone on Shilling Ranch after authorities ordered evacuations due to the Detwiler fire in MariposaAl Golub/Reuters
Detwiler fire Mariposa Yosemite California
A chimney is seen standing amid burnt-out remains of a property near the town of MariposaJosh Edelson/AFP
Detwiler fire Mariposa Yosemite California
Flames from the Detwiler fire burn on a hill overlooking the town of MariposaStephen Lam/Reuters

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.