MARIPOSA, Calif. — Authorities shut down a major highway Tuesday, keeping travelers far from the west entrance to Yosemite National Park so crews could battle a huge wildfire raging close to thousands of nearby homes.

Authorities said the blaze in a steep, dry river canyon had destroyed 25 homes and had forced the evacuation of 300 others in the Sierra Nevada foothill towns of Midpines and Coulterville.

An area of more than 46 square miles of rugged terrain had burned since a target shooter sparked the wildfire on Friday. The fire was just 10 percent contained Tuesday morning.

Flames were about 12 miles from Yosemite National Park, which remained open and teeming with visitors.

Firefighters might get some help from a slight drop in temperatures, which were expected to remain in the high 80s Tuesday, but accompanied by lower humidity and northwesterly afternoon wind, National Weather Service meteorologist Cindy Bean said.

Flames also threatened homes Tuesday in Montana, where authorities said more evacuations were likely.

A 10-mile stretch of California's Highway 140, which leads to Yosemite's west entrance, was closed until late Tuesday, fire officials said.

Other entrances to the park remained open, but some Yosemite visitors packed up and left campgrounds and other areas near the park.

"You would like to be relaxed on your holiday," said Trees Duipmans, visiting from Holland with her three teenage children. "If you're looking for tension you visit New York City. This here is a whole other kind of tension."

The family arrived at a campground Sunday, when smoke had already turned the sun a deep glowing red, and they decided to leave Monday.

"There was ash falling on our tent. We think we will go to the beach," Duipman said.

At the peak of summer, as many as 4,000 visitors a day stream into the park.

Power has been out since Saturday in the park and in the outlying community of El Portal on the park's western boundary. Hotels in the area remained open, operating on generators.

Elsewhere, fire officials at Red Lodge, Mont., said Tuesday that evacuation of an additional 200 homes west of the ski resort town was likely because strong wind threatened to push a wildfire closer to the area.

"When we come to tell you to leave, you need to leave," said Red Lodge Fire Chief Tom Kuntz.

Ninety homes already had been evacuated. Kuntz said officials hoped residents of the town itself would be able to stay in their homes, but he urged them to be prepared to leave.

The blaze had covered just over 9 square miles in a canyon eight miles west of Red Lodge and two miles west of the Red Lodge Mountain Resort. Employees of the resort used snowmaking guns to spray water on its two lodges and several lift shacks.

Associated Press writer Matthew Brown in Red Lodge, Mont., contributed to this report.