The second surge of the pandemic is well underway in the Washington region, prompting Virginia and Maryland to reinstate some shutdown restrictions last week while the District warily monitors its rising numbers.

With the Thanksgiving holiday arriving and colder weather driving people inside at a time when many are growing tired of wearing masks, health experts predict the increases will escalate in coming weeks.

“The trends that we’re seeing are alarming,” said Eric Toner, a pandemic preparedness expert at Johns Hopkins Bloomberg School of Public Health. “Governments need to be sensitive and responsive to changes like this.”

On Friday, after Virginia’s seven-day average for new cases had steadily climbed for a month to an all-time high, Gov. Ralph Northam (D) tightened restrictions for the first time since June lowering the number of people allowed to gather indoors or outdoors to 25, while requiring customers in essential and nonessential businesses alike to wear masks and maintain physical distance.

“While our cases are not rising as rapidly as some other states, I don’t intend to wait until they are,” Northam said through a spokeswoman while announcing the changes, which go into effect at 12:01 a.m. Monday.

That move followed similar restrictions imposed by Maryland earlier in the week, after Gov. Larry Hogan (R) said the virus’s spread through virtually every corner of the state has “crossed over into the danger zone.”

Maryland’s average for new cases climbed past its all-time high on eight consecutive days last week, landing at 1,596 on Saturday. The infection rate has more than doubled over the past two weeks, and so have covid-19 hospitalizations.

Hogan reimposed restrictions on restaurants, limiting indoor dining to half capacity, while several localities enacted even more aggressive measures to limit the size of gatherings and, in the case of Baltimore County, to put a stop to youth sports.

“I’ve always told it to you straight,” Hogan said at a Thursday news conference. “The sad truth is, the next several months will likely be the most difficult ones we’ve faced.”

District Mayor Muriel E. Bowser (D) has so far resisted such steps.

Though the seven-day average for new cases in the city has steadily climbed, to 132 on Saturday, the positivity rate for coronavirus tests has recently crept up but remained relatively low at 4 percent.

Bowser said the District has already been more cautious about potential infections than its neighboring jurisdictions.

“Some states that were not as conservative as us may need to make some changes, and that’s a good thing,” the mayor said on Thursday.

The nature of this surge has been different from the first one, which affected the region’s more populous areas more severely. This time, new cases in rural communities in Maryland and Virginia that had largely escaped the virus in the spring are now driving up their states’ numbers, while more densely populated areas are seeing steady increases that health officials say are caused by a variety of factors.

In Virginia, a lax attitude about mask-wearing has begun to settle in, particularly around friends and relatives, prompting the state to launch a public-relations campaign about the importance of such preventive measures in the days before increasing the restrictions.

“We’ve got to look at, really, how we change people’s behavior,” Northam said during a media briefing last week, when he also announced an expansion in testing that will allow an additional 7,000 people per day to get tested by the end of the year.

While cases are rising everywhere in Virginia, the two hardest-hit areas this fall are Northern Virginia, the state’s most populous region, and the more sparsely populated rural communities in the southwest.

Northern Virginia health officials say the steady rise in new cases there — at their highest levels since June — has multiple causes.

One prominent reason is the crowded housing conditions in some of the more densely populated D.C. suburbs, particularly for Latino immigrant families who have also been at higher risk of exposure while working service-industry jobs, officials say.

The city of Alexandria, which is 17 percent Latino, published the results of a contact-tracing survey that showed 44 percent of the respondents who tested positive became infected by somebody else in their household.

About a quarter of the 422 residents surveyed were probably exposed by someone at work, while 10 percent had gone to a social gathering before testing positive and 7 percent had recently gone to a restaurant, according to the survey, which was published in late October.

The survey did not reveal how those who infected members of their household got the virus. But the higher rate for that category of exposures speaks to the fact that many residents in the region don’t have the space to isolate themselves from others once they test positive, said Stephen Haering, Alexandria’s health director.

Complicating matters is the fact that it often takes two or three days for someone who is infected with the coronavirus to show symptoms, making it less likely that someone will keep their distance from others in the beginning, Haering said.

“You don’t know to isolate until you’re actually feeling ill,” he said.

Nearby Fairfax County, the state’s most populous jurisdiction, has seen similar trends, health officials there said.

Another chief concern is social gatherings, especially as more people let down their guard against infection with family members and friends, said Gloria Addo-Ayensu, director of the Fairfax health district.

“It’s easier when you are in a place like the grocery store and you are afraid of the other people you don’t know and don’t want them close to you,” she said. “But we don’t have the same visceral reaction when we’re dealing with an old cousin that we haven’t seen for the last six or eight months.”

In the southwest, the positivity rate for coronavirus tests has been hovering just below the state’s 10 percent threshold, though it has climbed to nearly 14 percent in some areas, state figures show.

Local officials said area residents in the region that borders North Carolina, Tennessee and Kentucky tend to travel back and forth to those nearby states, increasing their chances for infection.

They also tend to go maskless on weekends, with some local houses of worship not strictly abiding by the state’s mask mandate, officials said.

“Many of these gatherings may have been happening over the summer months in the outdoors setting, and now that weather is cooler and the gatherings are indoors, we know this increases the risk of transmission,” said Sue Cantrell, director of two health districts in the region. “Faith-based gatherings that do not follow best practice with face coverings and distancing continue to contribute to many of our cases.”

Unlike in other regions of the state, hospitals in the southwest are nearly full. But local health officials say there are backup plans that can add more capacity.

In some areas of the far southwest, health-care workers themselves have become increasingly affected, representing about 12 percent of the total number of cases last week.

That rising trend has the potential to affect other areas of health care in the rural region, where there are fewer hospitals and less access to health care, local officials say.

“We are very concerned about the impact of widespread covid-19 among our health-care workers,” Breanne Forbes Hubbard, the population health manager for the Mount Rogers Health District, said in a statement. “We know that exceeding hospital capacity, either beds or staff or both, could mean that people will suffer or die from things that otherwise would be treatable.”

As the load of cases increases, hospitals everywhere will become more and more burdened, said Amanda Castel, an epidemiologist specializing in infectious diseases at George Washington University.

“There is that lag between new cases and hospitalizations and a lag between new hospitalizations and deaths,” Castel said, arguing for more localized restrictions to be implemented. “We have to be quick and think about how to rapidly contain the virus in those areas.”

Erin Cox and Gregory S. Schneider contributed to this report.