Two elite Manhattan prep schools will be closed Friday for a “thorough cleaning” due to a family that’s being monitored for the coronavirus, The Post has learned.

Both the all-boys Collegiate School on the Upper West Side and the all-girls Spence School on the Upper East Side will be closed, according to messages on their websites and an email obtained by The Post.

The family being monitored for the virus has ties to both schools, likely a child attending each of the institutions, a source told The Post.

One of the parents was exposed to the illness on a recent international trip and the family is now under quarantine, awaiting test results, according to an email Collegiate School headmaster Lee Levison sent to community members on Thursday.

“The family informed us immediately of their situation and is following the protocols recommended by the Department of Health and family physicians,” Levison wrote in the email obtained by The Post.

The school will shutter for a “thorough cleaning,” though both state and city health departments said it was OK to stay open, Levison added.

“I understand and appreciate the anxiety associated with the dynamic situation regarding COVID-19, so in this instance we are acting in a very conservative manner,” he wrote.

The prestigious Spence School also said, on its website, that it would be closed Friday for “comprehensive sanitation of the entire campus.”

The schools are expected to reopen on Monday.

Neither immediately returned a request for comment late Thursday.

About 2,800 New York City residents are under quarantine to prevent the spread of the coronavirus and being monitored by the city Department of Health, officials said Thursday.

Map of coronavirus cases in the US