PALMER, Alaska — Over the summer months, Alaska’s restaurants filled up, the state invited tourists to come explore and fisheries workers arrived by the thousands to live in crowded bunkhouses. And yet the coronavirus remained largely in check.

Of course, Alaska had the benefit of isolation and wide-open spaces. But officials had also developed a containment effort unlike any other in the country, doing more testing than almost every other state and then tracking every person who came back positive with an army of contact tracers, following up with daily phone calls for those infected and all their close contacts.

It paid off: Even with the extensive search for possible infections, Alaska was recording some of the fewest coronavirus cases per capita in the nation.

Now, as temperatures begin dipping back below freezing and sunset arrives with dinner, the state’s social gatherings, recreational activities and restaurant seating have started moving back indoors — and the virus has seized new opportunities. With new case clusters emerging throughout the state, the acclaimed contact tracing system has grown strained.

At a time when cases across the United States are rising and people are growing fatigued by months of restrictions, Alaska’s struggles provide an early warning that winter could bring the most devastating phase of the pandemic.

“We’ve been markedly concerned about what the fall and winter will look like, and I think it’s playing out that it’s highly concerning,” said Dr. Anne Zink, Alaska’s chief medical officer.

On Friday, the weekly case average in Alaska reached its highest point of the year. The percentage of people testing positive has doubled in recent weeks. In parts of the state, tribal villages have been forced into lockdown.

Across the country, cases have been surging toward new highs since the onset of fall, with more than 59,000 new cases identified Tuesday. At least 12 states have added more cases in the past week than in any other seven-day stretch — many of them northern states such as the Dakotas, Wisconsin and Illinois.

Along with cold-season gatherings moving into more confined spaces, there is evidence that the coronavirus is more virulent in colder weather and lower relative humidities. Dr. Mohammad Sajadi, who studies infectious diseases at the University of Maryland, was among the researchers who examined global trends in the early part of the pandemic and saw a weather correlation.

Sajadi said there could be a range of factors: Researchers have found that some viruses persist longer in colder and drier conditions; that aerosolized viruses can remain more stable in cooler air; that viruses can replicate more swiftly in such conditions; and that human immune systems may respond differently depending on seasons.

It is possible that the virus will spread rapidly in the coming months and create the need for new lockdown restrictions, Sajadi said.

“The conditions will be prime for something like that happening,” he said.

Alaska faces some particular challenges as winter approaches, with state officials fearing the prospect of an outbreak in a remote setting: Most villages in the state are unconnected to the road system, and winter weather could prevent medevac flights from reaching them. Zink described one small community with no running water that is currently dealing with an outbreak, and weather has already prevented officials from getting supplies in. She declined to identify the community for privacy reasons.

On the western coast of the state, 68 people in the Native village of Kwinhagak have tested positive and four of them have had to get medevac flights to Anchorage, said Ferdinand Cleveland, the tribal administrator. The community has about 800 residents.

Cleveland said the village has been in a lockdown that is expected to last about a month. He said residents have at times struggled to get supplies such as masks and gloves, and he worries about what lies ahead.

“I’m expecting another wave,” he said.

Gov. Mike Dunleavy said that he had expected cases would go up as the weather changed, and that the state had continued to build out supplemental hospital capacity should it be needed.

“It’s going to be a very tough fall and winter for the entire world,” he said.

In the pandemic of 1918, influenza killed more than half of the residents in some of Alaska’s Native communities. The virus had arrived by boat from Seattle, where crews had screened passengers to prevent any spread, only to have an outbreak begin in Nome in the days after the ship docked. Most of the territory’s deaths during the pandemic occurred over the subsequent weeks.

That history surfaced in the spring, when Alaska was deciding whether to move ahead with a fishing season that would draw thousands of people from elsewhere. Community members balked at the possibility of bringing the virus to areas that had managed to have few if any infections.

The season ultimately went ahead with extensive testing and restrictions, including fences that kept workers in processing facilities quarantined to their sites so that any infections could not spread into communities. Officials believe it was largely a success.

The state has also embraced strict strategies at its airports, where arriving passengers must present proof of a recent negative coronavirus test or pay for a test and await results in quarantine. Before leaving the terminal in Anchorage, passengers are funneled to a row of tables where people wearing protective equipment work behind Plexiglas shields checking paperwork and informing those found deficient about testing options and quarantine mandates.But challenges remain. Zink said that while the contact-tracing goal had been to keep tabs on people daily, that has changed to less-frequent contacts. Public health officials have set a goal to reach every infected person within 24 hours of diagnosis, but with so many cases emerging in recent days, that has at times slid to 48 hours.

“We are still doing contact tracing,” Zink said. “It’s just a more bare-bones contact tracing than it was earlier in the pandemic.”

One of the challenges that Zink has consistently faced is convincing residents to wear masks and stay distanced, two tools that public health experts have said can help reduce the spread of the virus. In May, when Dunleavy lifted statewide restrictions, he left decisions about how to manage the pandemic to local jurisdictions.

For masks, that has left some in a bind. In Fairbanks, the mayor said a local order would send people outside the city limits in places where masks would not be required. He instead focused on trying to coax people by encouragement.

In Wasilla over the weekend, people gathered in rows of tables at a German-themed bar for the start of an Oktoberfest celebration. While the outdoor seating offered panoramic views of the snow-capped Chugach Mountains, the weather was near freezing so people crowded inside, where no one was wearing masks.

Down the highway, in Palmer, a few hundred people gathered at an indoor bazaar at the state fair, sampling sweet pecan nuts and touching plush gnomes made of beaver, moose and deer pelts. Most people were not wearing masks, and that included Santa Claus and Mrs. Claus, who welcomed children walking up a red carpet to join them for photos before sending them off with lollipops.

They were still taking some precautions, with hand sanitizer available. Darell Schurman, serving as Santa, said he wanted the children to experience the joy of the season and feel a sense of normalcy.

“People can wear their masks for pictures, but they’ve all been taking their masks off,” Schurman said. “The parents are letting the kids get right up in our laps.”

Schurman said that the catering business he ran with his wife had been upended by the virus, and that he was hoping the holiday season would provide more opportunities for them to do work at Christmas events.

“We’ve got to get back to normal,” he said.

That was also the goal for the state’s youth hockey organizations. They spent the summer working with government officials on a plan to reopen rinks in Anchorage to allow the fall season to proceed.

But at a tournament this month, videos showed some parents watching from the stands without masks. Darryl Thompson, the president of the Alaska State Hockey Association, who did not attend the tournament, said he believed that too many people were at the games and that parents should have taken more responsibility to keep apart.

“We as a community could have done better,” Thompson said.

When the tournament was over, the Anchorage Health Department announced it was investigating a “cluster” of cases linked to the games.