About 2,800 New York City residents are under quarantine to prevent the spread of the coronavirus — and some could face fines or jail time if they venture outside their homes, officials said Thursday.

“The powers that we have could involve the police,” city Health Commissioner Dr. Oxiris Barbot warned during a news conference at One Police Plaza.

The city’s Department of Health was monitoring 2,773 people in “home isolation” as of Thursday morning, according to an afternoon update from Mayor Bill de Blasio’s office.

Only two, husband-and-wife health care workers from Manhattan, were under a mandatory quarantine order imposed when she tested positive for coronavirus following the couple’s return from Iran last week.

But officials said the number of people confined to their homes — either voluntarily or under orders — would almost certainly rise amid the outbreak.

“We’re all very sober right now about what tomorrow could bring,” de Blasio said.

“We’re going to get more and more mandatory as needed.”

Officials said the people under quarantine were subject to unannounced spot checks several times a week, with some conducted by the “health police.”

Those DOH employees are sworn peace officers with the legal authority make arrests, use physical force and conduct searches — although they can’t carry guns unless they’re licensed.

De Blasio claimed the city wouldn’t face a shortage of workers to enforce the safety measures because the DOH has been authorized to hire employees and also borrow from the city’s hospital system.

The DOH asked any New Yorker who has visited the five hotbeds for infection — China, Iran, Italy, South Korea and Japan — to “self-isolate as a precaution” for 14 days following their return.

Barbot also issued an order mandating coronavirus testing for any teacher, health-care worker or first responder employed by the city who is considered at risk of being infected.

Anyone who refuses to be tested will be ordered confined to their home or “such other location determined by the Department,” the order says.

In Westchester County, Gov. Andrew Cuomo said, the number of people quarantined was “maybe higher” than the 1,000 he announced on Wednesday, following confirmation that a lawyer from New Rochelle, identified by sources as Lawrence Garbuz, was the state’s second coronavirus case.

Of those, Cuomo said, “two or three dozen” are under mandatory quarantine.

When asked why the governor’s numbers were so vague, a state Department of Health spokeswoman said that “the number of people under self-isolation and/or quarantine changes almost daily.”

City and state laws don’t provide any penalties for violating voluntary quarantine, which is the “preferred method” of isolating carriers or potential carriers of contagious diseases, according to an official Public Health Legal Manual published in 2011.

But if people refuse to comply, they can be subjected to involuntary quarantine by order of the health commissioner in New York City, or by local boards of health elsewhere in the state.

Breaking involuntary confinement can result in fines of between $200 and $2,000 per day in the city and up to $2,000 per incident elsewhere.

Violations that pose an immediate danger to the public can also result in arrest and prosecution on a misdemeanor charge.

Also Thursday, ex-Jets quarterback Boomer Esiason cited the morning’s front-page story in The Post on his WFAN radio show while blasting the “moron” who violated his quarantine to attend a party organized by Dartmouth College’s Tuck School of Business, which Esiason’s cystic fibrosis-stricken son attends.

Additional reporting by Yaron Steinbuch