Mayor Bill de Blasio on Tuesday rejected calls to block the banning of expectant fathers and others from hospital delivery rooms to prevent the spread of coronavirus.

“This is a medical decision, obviously,” de Blasio said during an afternoon briefing at City Hall.

“It is something where all of us who are not doctors need to defer to the medical community.”

But de Blasio said the bans announced by the NewYork-Presbyterian and Mount Sinai networks weren’t being adopted by the city’s Health and Hospitals Corp.

“The decision made by our public hospitals is: partners should be allowed for the process of labor and when a woman is giving birth,” he said.

Any visitors will have to wear surgical masks and pass a clearance procedure that will exclude anyone who’s tested positive for the coronavirus or has symptoms of the deadly disease, Hizzoner added.

More than 320,000 people have signed a change.org petition that asks de Blasio and Gov. Andrew Cuomo to ensure that expectant mothers can have “a spouse, partner or other chosen person” with them when they give birth in a hospital.

Cuomo’s office hasn’t returned repeated requests for comment on the matter.