As the number of new cases rose and calls to limit social contact multiplied, officials in Pennsylvania and New Jersey on Wednesday confronted the possibility that coronavirus could be spreading through communities in ways they cannot trace.

The number of presumed and confirmed infections in the two states — nearly all of which have been linked to travel and contact with others who have the virus — reached 39, and Delaware reported its first. But state and county investigators said they had so far been unable to determine the origins of two new cases in New Jersey, and Montgomery County still had not identified the source of an infection it announced Tuesday.

Echoing an advisory heard around the world, officials urged people to avoid large gatherings and restrict visitors to elderly and vulnerable communities, and to expect more closures and cancellations.

“Hand-shaking is done. Hugs are over. None of that,” said Val Arkoosh, the chair of the commissioners in Montgomery County, where nine of Pennsylvania’s 16 cases have been reported, and where a 10th coronavirus patient, from out of state, was being treated.

New Jersey officials would not identify the counties with potential “community spread,” the term for the hard-to-trace, person-to-person transmission, but said they would provide more details Thursday.

“Community spread indicates that the coronavirus is amongst us,” New Jersey Health Commissioner Judith Persichilli said. "We have an expectation that that may be the case.”

As the World Health Organization officially classified the novel coronavirus as pandemic and the U.S. stock market again tanked, the number of coronavirus cases in the United States surpassed 1,000, with at least 33 related deaths by Wednesday night. People have tested positive for the virus in 37 states and Washington, D.C.

The CDC awarded more than $16 million to Pennsylvania, $3.5 million to Philadelphia, and more than $15 million to New Jersey to bolster government responses to the virus, part of a half-billion-dollar distribution among state and local jurisdictions battling the outbreak.

A day after Philadelphia announced its first case and scrapped plans for its annual St. Patrick’s Day Parade, both the University of Pennsylvania and Temple University announced they would end on-campus instruction and shift to online teaching for the rest of the semester. Penn told its students not to return from spring break; Temple told its to leave campus by Friday evening.

The University of Delaware made similar plans to end classroom instruction after a New Castle County man who is over 50 and associated with the school community became Delaware’s first presumptive positive case.

More area colleges and universities joined the wave of temporary closures for cleaning or short-term remote learning, and numerous arts and sporting events in school and professional venues were canceled or modified. That included this year’s NCAA basketball tournaments, which will be played in arenas without fans.

School districts and schools across the region also continued to grapple with the possibility of an expanding virus. Mastery Clymer Elementary, a charter school in North Philadelphia, became the first in the city to announce a closure — on Thursday and Friday — for precautionary cleaning.

The City of Philadelphia told its 27,000 employees it was relaxing sick-leave and work-from-home policies, while SEPTA said it was preparing for a potential drop in ridership or decrease in staffing. And Nasdaq, the giant securities-trading group, said it had prepared a backup trading floor and secure data facility at the Philadelphia Navy Yard business center in South Philadelphia.

As contact tracing became more complex, overlap of the region’s counties — among which some two million people commute daily — began to emerge.

Montgomery County and Philadelphia officials were set to meet Thursday to compare notes on separate efforts to determine how a 70-year-old woman from Cheltenham Township, who is hospitalized in Philadelphia with a presumptive positive case, became sick, Arkoosh said. Meanwhile, state officials are doing the contact tracing for Philadelphia’s single resident with the virus. That person is quarantined now but works in Montgomery County.

Wednesday’s newest case in Montgomery County was a 35-year-old Lower Providence Township Police Department officer who had direct contact with a local coronavirus patient. He is being monitored at home in Perkiomen Township. The state’s other new presumptive positive was in Monroe County, the second for the Pocono Mountains area.

Two adults in Bucks County, whose infections were announced late Tuesday night, caught the virus at a gathering in another state that was attended by two people who later tested positive. The adults live in the same household and have mild symptoms. The county has contacted people whom they may have exposed and asked them to quarantine.

“There’s no community spread here in Bucks County that we know of,” county Health Department Director David Damsker told reporters at a briefing Wednesday afternoon.

Like Philadelphia and state officials — but unlike their counterparts in Montgomery County — the Bucks director would not provide details about the patients, including where they live.

“It wouldn’t change any public health issue, it wouldn’t make anybody any safer,” Damsker said. “If I thought there was any help to the public to do so, we would do so.”

Bucks County will start to implement measures to help protect the elderly and people in long-term care facilities, Damsker said, including halting all visitation to Neshaminy Manor starting Wednesday. The county will conduct a conference call with all long-term care facilities to discuss minimizing exposure of residents.

“We think this is the population where we’re going to see the most severe illness and death, so we’re going to get out ahead of the curve,” Damsker said.

Health officials in New Jersey also recommended that long-term care facilities restrict and screen their visitors. Staff and visitors to the State Correctional Institution Phoenix will also be screened for the virus due to the high concentration of cases in Montgomery County, the Department of Corrections said Wednesday.

Local officials kept up their mantra: The best way to help stop the spread of the virus and protect both yourself and people vulnerable to getting sick is to wash your hands, cover your coughs and sneezes, and stay home if you have any symptoms of illness. Some officials also urged people to cancel large events and to move away from anyone coughing in public.

Rather than basing judgments solely on crowd size, people should consider whether attendees might include folks from out of state, people with elderly relatives at home, or others potentially at risk, according to Arkoosh, the Montgomery County commissioner, who is also a doctor.

“This isn’t going to be forever,” she said. “There will be an end to this and it won’t be that far away. And the end will come quicker if we all take some measures right now to stop this thing now, rather than let it drag on.”

A previous version of this story gave an incorrect age for the Lower Providence Township police officer.

Also contributing to this article were staff writers Oona Goodin-Smith, Ellie Rushing, Laura McCrystal, Susan Snyder, Maddie Hanna, Allison Steele, Patricia Madej, Joseph N. DiStefano, and Samantha Melamed.