FRESNO, Calif. (AP) — A giant wildfire raging out of control spread into Yosemite National Park on Friday as authorities urged more evacuations in nearby communities where thousands have already been forced out by flames marching through the timbered slopes of the western Sierra Nevada.

The fire has hit the park — whose streams and lakes, grandeur and granite peaks attract millions of people from all over the world — at the height of summer season, just a week before the Labor Day holiday.

The blaze has closed backcountry hiking in the park, but was not threatening the Yosemite Valley region, one of California’s most popular tourist destinations.

The fire grew to more than 165 square miles and was only 2 percent contained. It continued to spread in several directions, although “most of the fire activity is pushing to the east right into Yosemite,” said Daniel Berlant, spokesman for the California Department of Forestry and Fire Protection.

Smoke blowing across the Sierra into the state of Nevada forced officials in several counties to cancel outdoor school activities and issue health advisories, especially for people with respiratory problems.

The fire was threatening about 4,500 residences, according to the U.S. Forest Service. Already, the blaze has destroyed four homes and 12 outbuildings in several different areas. More than 2,000 firefighters were on the lines and one sustained a heat-related injury.

While the park remained open, the blaze closed a 4-mile stretch of State Route 120, one of three entrances into Yosemite on the west side. Two other western routes and an eastern route were open.

Within the park, the blaze was burning on about 17 square miles in a remote area around Lake Eleanor, about 4 miles northwest of Hetch Hetchy reservoir, Yosemite spokeswoman Kari Cobb said.

Backcountry permits are required to hike in that area, Cobb said, and the park was no longer issuing those and had contacted every person who had received a permit to go there. Two roads into that area were closed and occupants of a campground near the Route 120 west entrance were relocated.

“We don’t have anybody we know of in that area based on the permits we have out now,” she said.

The fire was more than 20 miles from Yosemite Valley and skies there were “crystal clear,” Cobb said.

The spectacular valley carved by glaciers offers visitors such iconic sights as the Half Dome and El Capitan rock formations and Bridalveil and Yosemite falls.

“Right now there are no closures and no visitor services are being affected in the park,” Cobb said. “We just have to take one day at a time depending on fire activity.”

Officials also have advised voluntary evacuations of more than a thousand other homes, several organized camps and at least two campgrounds in the area outside the park’s boundary.

On Friday, officials issued voluntary evacuation advisories for two new towns — Tuolumne City, population 1,800, and Ponderosa Hills, a community of several hundred — which are about five miles from the fire line, Forest Service spokesman Jerry Snyder said. And a mandatory evacuation order remained in effect for part of Pine Mountain Lake, a summer gated community that’s a few miles from the fire.

“It feels a little bit like a war zone, with helicopters flying overhead, bombers dropping retardant and 10 engine companies stationed on our street,” said Ken Codeglia, a retired Pine Mountain Lake resident who decided to stay to protect his house with his own hoses and fire retardant system. “But if the fire gets very hot and firefighters evacuate, I will run with them.”

More homes, businesses and hotels are threatened in nearby Groveland, a community of 600 about 5 miles from the fire and 25 miles from the entrance of Yosemite.

Usually filled with tourists, the streets are now swarming with firefighters, evacuees, and news anchors, said Doug Edwards, owner of Hotel Charlotte on Main Street.

“We usually book out six months solid with no vacancies and turn away 30-40 people a night. That’s all changed,” Edwards said. “All we’re getting for the next three weeks is cancellations. It’s a huge impact on the community in terms of revenue dollars.”

The fire is raging in the same region where a 1987 fire killed a firefighter, burned hundreds of thousands of acres and forced several thousand people out of their homes.

Five wildfires also were burning in Yellowstone National Park but not nearly as vigorously since portions the park in northwest Wyoming got half an inch or more of rain Wednesday.

Park officials continued to monitor a 12-square-mile fire five miles north of Lake Village. Thick smoke forced them to close the road north of Fishing Bridge on Tuesday.

Even so, they didn’t plan yet to send in firefighters but continued to let the fire burn to help the ecosystem.

___

Associated Press writers Jason Dearen, Lisa Leff and Andrew Dalton in San Francisco and Mead Gruver in Cheyenne, Wyo. also contributed to this report.