With tens of millions of Americans under orders to stay at home or practice social distancing, scores have been converging on places like Yellowstone, Grand Teton and the Great Smoky Mountains to escape the specter of the coronavirus — until now.

On Tuesday, the National Park Service announced that all three national parks would be closed immediately to prevent the spread of the virus, citing concerns about crowding and requests from local public health authorities. Even the governor of Montana had pressed for the closing of Yellowstone.

At the Great Smoky Mountains National Park, which straddles the border of Tennessee and North Carolina and was the busiest national park last year, officials reported a surge in visitors during the past week.

They said that 30,000 people visited the park each day — 5,000 more a day than last March — and caused congestion at several of the park’s most popular sites.