Philadelphia and Pennsylvania both broke single-day records for new coronavirus infections Tuesday, and public health officials said people should avoid social gatherings in order to curb the spread and help prevent the need for new restrictions.

Pennsylvania reported more than 4,000 cases for only the second time during the pandemic and New Jersey logged more new infections than it has reported in one day since April 24.

The commonwealth also reported 62 deaths, the highest number recorded in a single day since June.

As the case surge led the Philadelphia School District to reverse its reopening plan, City Health Commissioner Thomas Farley urged residents to avoid contact with anyone outside their own household. Though some cases have been traced to offices and restaurants, the virus is spreading primarily through get-togethers with family and friends, he said.

“Because the spread is mainly happening in private settings,” Farley said, “our success depends on what Philadelphia residents do on their own.”

As the fall surge continues, New Jersey and Pennsylvania officials have also said limiting social events is key to curbing the spread; local officials echoed that on Tuesday. In Bucks County, which now has the second-highest rate of positive coronavirus tests in the suburbs behind Delaware County, commissioners emphasized that another shutdown shouldn’t be needed if people wear masks in public and stop gathering.

“Last time, long-term care facilities were our problem. This time, they’re doing very well,” said County Commissioner Diane Ellis-Marseglia. “It’s the general public that’s having trouble. In general, they’re having trouble because they’re probably tired of all this and they’re having private events.”

With two weeks until Thanksgiving, it’s a national imperative: The United States has reported more than 100,000 new infections for seven straight days, and is now averaging nearly 120,000 new cases a day as COVID-19 continues to spread widely across the country. Nearly 59,000 people are hospitalized, according to data from Johns Hopkins University.

On Monday, 30 states set a record for their seven-day average, and seven states reported new highs for daily infections, according to the Washington Post.

Pennsylvania reported 4,361 newly confirmed cases Tuesday, breaking the record set Saturday. It is now averaging over 3,400 new cases a day over the last seven days, according to an Inquirer analysis. At its peak in April, previously the worst period of the pandemic, the state averaged 1,935 cases a day.

New Jersey reported 3,877 new cases Tuesday, the most in a single day since the state’s severe first wave in April and May.

“These numbers are devastating,” tweeted Gov. Phil Murphy. The state also reported 21 newly confirmed deaths.

Philadelphia reported 879 new cases, which Farley said was the highest ever for a single day. The city’s positivity rate is at its highest since mid-May — 9.3% — and the last week’s average number of new confirmed cases per day climbed higher than the city’s previous peak in April.

“We are increasingly concerned that hospitals may come under strain,” said Farley, reporting 386 COVID-19 patients in city hospitals, a number he said has been increasing “fairly rapidly.”

Farley said rising hospitalizations will be a key factor in determining whether to impose more restrictions or a broader shutdown. City hospitals were able to manage about 1,000 coronavirus patients at one time during the spring surge.

Philadelphia has been averaging 15 deaths per week in recent weeks, Farley said, compared withabout 10 per week in September.

Mayor Jim Kenney said residents should remember they can return to “some semblance of normal life” sooner if they follow health guidelines.

“I know when people get kind of fed up with restrictions, they start to rebel a little bit,” he said Tuesday. “These numbers will throw some cautionary information into the mix so people will say, ‘Yep, this is still for real, and we need to pull that mask up tight and we need to stay indoors as much as we can.’”

Contact tracing has connected spread of the virus to small social gatherings, sports events, college parties, weddings, funerals, bridal showers, birthday parties, and football watch parties. Farley also said it was not clear whether indoor dining-related spread had occurred in restaurants following or flouting the city’s capacity limits.

In a news conference, Bucks County officials said the county’s number of new cases between Nov. 1 and 7 was 79% higher than in the previous week, and noted that Friday’s daily report of 161 new infections was the highest ever reported by the county — though hospitalizations and deaths, like in the state, remain much lower.

The county has seen outbreaks from family events, weddings, a celebratory gathering following a football game, and at least one Halloween party, said Commissioner Bob Harvie. They have not yet seen transmission within schools that are open for in-person classes, he said.

As Thanksgiving approaches, the Pennsylvania Health Department has directed residents not to hold feasts with people outside their households, and the U.S. Centers for Disease Control and Prevention said in guidelines updated Monday that is the best way to avoid risk of spreading the virus.

If hosting a gathering, officials recommend holding it outdoors, wearing masks while cooking, and keeping guest lists small.

“We want to make sure we can go into this holiday season and have some normality,” Harvie said, “and we can’t do that if the numbers keep spiking.”