Click here if you are unable to view this gallery on a mobile device.

As a major wildfire disrupts thousands of vacations and the tourist economy of the Sierra Nevada, National Park Service officials on Tuesday announced they are closing large sections of Yosemite National Park and ordered visitors and employees to evacuate by noon Wednesday.

The announcement Tuesday afternoon that two main tourist areas — Yosemite Valley and Wawona — will close came as flames encroached from the Ferguson Fire on the park’s western boundary and hazardous smoke blanketed the region.

All park hotels, campgrounds, and visitor services in Yosemite Valley and Wawona will be closed, said Scott Gediman, a park spokesman. Park officials hope to reopen by Sunday or Monday.

Visitors staying in park campgrounds and hotels were being asked to leave on Tuesday afternoon and visitors who had reservations were being notified they will receive refunds.

“We apologize to visitors. We understand the impacts on their trips. But this is about the health and safety of them and park employees,” Gediman said.

Tuesday was the first time that the park has been closed due to fire in 28 years, since the A-Rock fire burned 17,700 acres and consumed several homes on the park’s western boundary at Foresta and El Portal.

Gediman acknowledged that the decision by the National Park Service comes during the peak of the summer tourist season, when thousands of people are in the park from all over the world, and local communities near the iconic attraction are relying on tourism dollars for the bulk of their economies.

“We understand this is a huge impact,” Gediman said. “We’re hoping to resume normal operations as soon as it is safe.”

The last time Yosemite Valley was closed was in March, when parks officials locked gates for two days due to flood concerns. The park also has closed several times over the years due to government shutdowns.

The Ferguson Fire, which started July 13 along Highway 140 in steep, remote canyons of national forest land near El Portal, has burned more than 36,587 acres, and as of Tuesday, was only 25 percent contained. The blaze has sent massive clouds of smoke into the park, spiking air pollution to unhealthy levels. On Tuesday, as with every day over the past week, levels of particulate pollution in Yosemite Valley have shrouded most views, exceeding levels in Beijing, China, one of the world’s most polluted cities.

The fire was taking a major hit on the tourism industry in the counties surrounding the park.

Linda Mayo, executive director at the Tuolumne County Visitors Bureau, said her organization is helping visitors relocate to hotels outside the park. And although poor air quality and the flames will put a dent in summer profits, the hotels, restaurants and other businesses around the park have weathered other fires, floods and government shutdowns in the past, she said.

“We’ve been through this before,” she said. “And things seem to pick up after the fires die down. This isn’t our first rodeo.”

Highway 140 has been closed since the fire began. Although the fire has not yet burned into the park, Tuesday it was only about three miles away. Firefighters will be setting backfires in the park near Highway 41 as soon as Wednesday, Gediman said, which could cause that road to be blocked with equipment and flames.

If Highway 41 is closed, that would only leave one two-lane road in and out of Yosemite — Highway 120. The fire was slowly creeping north toward that road also, causing concerns about safety risks if people needed to be evacuated.

In addition to Wawona and Yosemite Valley, the Mariposa Grove of Giant Sequoias is also closed. Other major areas in the park that have been closed in recent days due to the fire include Glacier Point Road, Bridalveil Creek Campground, the Wawona Campground, and the Merced Grove.

Some park areas remain open, however. Hetch Hetchy, along with the Tioga Road, is farther from the fire and will stay open. Tuolumne Meadows Lodge and campgrounds along Tioga Road also will stay open.

As of Tuesday, 3,311 firefighters were working to contain the Ferguson Fire, along with 194 engines, 45 water tenders, 16 helicopters, 91 crews and 52 bulldozers.

The fire is disrupting activities at San Jose Family Camp, a campground leased by the city of San Jose from the U.S. Forest Service along Highway 120 near Groveland.

“Every five minutes, I get a phone call about the fire,” said Wendy White, a camp counselor there, on Tuesday afternoon.

White said although the Ferguson fire is about 12 miles away, smoke from the blaze already has affected campers. On Monday, a family with a 9-month-old infant suffering a coughing fit left the camp a day early, getting a refund for the day they didn’t stay. And although the precise cause has not been confirmed, a 50-year-old woman was driven to a hospital after collapsing at the camp over the weekend.

White said she is planning to stay on at Family Camp until August, but she recognized that should the fire reach Highway 120 as many fear, the camp, with more than a dozen staff including counselors, kitchen workers and maintenance crews, will have to evacuate.

Until then, despite the cancellations pouring in, the camp is staying open, with counselors reminding campers, especially those with asthma, to take precautions and limit their time outdoors.

But smoke may not be the only consequence of the Ferguson Fire affecting visitors. Animals are spreading out to escape the flames.

“Some bears are crawling in,” said White.

Start your day with the news you need from the Bay Area and beyond.

Sign up for our Morning Report weekday newsletter.

As soon as the air starts to clear, Mayo is looking forward to encouraging tourists to come back and stay. “Hopefully this won’t be too long,” she said. “Hopefully, it will be back to business as usual soon.”

For updated 24-hour road and weather conditions for Yosemite National Park, please call 209-372-0200, press 1 and press 1 again. Updated information is also available on the park’s website at www.nps.gov/yose.