Public health officials acknowledged Friday that more could have been done to contain the spread of coronavirus in the city months before the pandemic thrust the city into its worst public health crisis in the last century.

It's been trial and error. That much was clear Friday during a City Council hearing, as officials tried to explain Mayor de Blasio’s decision to move the test and trace operation from the Department of Health — which has previously led similar efforts — to the public hospital system.

Dr. Mitch Katz, CEO of Health + Hospitals, the city's public hospital system testified before the City Council.

“The humility point is we were all wrong. We should have done something way earlier, but that wasn’t anybody’s fault, all of us were operating on the information that we had," Katz said.

Members of the City Council questioned the administration's decision, saying the change would lead to bottle ups in a program that is considered a key part of the recovery effort.

“I’m disappointed that the de Blasio administration decided the middle of a pandemic was the best time for a bureaucratic reshuffling that potentially creates new and unnecessary obstacles for the critical, complicated work of contact tracing," Councilwoman Carlina Rivera, a Democrat who represents parts of Manhattan said in opening remarks.

In a city of more than eight million, the administration is now scrambling to build a team thousands strong tasked with tracking the contacts of every person that tests positive for the virus. Successfully doing it could determine if New Yorkers can ever return to normalcy.

Katz defended the decision, saying the public hospital system's operational capacity will be needed in the tracing effort.

“I think there would be tremendous harm to think that contract tracing done in isolation from the ability to do testing and the ability to isolate people could be nearly as effective," Katz said.

But also in focus was the ongoing fight between the two chief agencies tasked with responding to the COVID-19 crisis.

What’s been described as an all-out war between the health department and City Hall spilled into public view this week. Dr. Oxiris Barbot, the city’s Health Commissioner has been absent from daily briefings and the mayor has repeatedly stopped short of expressing confidence in her ability to lead the agency.

“What is clear is the serious dysfunction playing out behind the scenes at a time when New Yorkers desperately need to have confidence in their city government,” said City Council Speaker Corey Johnson.

As the city remains in the thick of a crisis, its chief respondents don't even seem to be talking to each other.

Asked when he had last spoken to the commissioner, de Blasio would only say it was "a few days ago."

During testimony, Katz stressed him and Barbot have been working together, and that they are both trying to ensure New Yorkers can end this lockdown period safely.

"I talked to her three days ago. I said I really want to work with you, and she said Mitch, you know we are on the same team,” Katz said. “I know what she cares about at the end of the day is us getting out of lock up in a safe way, and saving lives and she cares about that more than anything else and that is what we all need to focus on."

A spokesperson for the department said Barbot was “busily working” on the COVID-19 response, attending virtual meetings and conference calls. She is expected to meet with the mayor over the weekend. ”