In retrospect, Mayor Bill de Blasio said, he should have called Emergency Management Commissioner Joseph Esposito himself. If he had, maybe things wouldn’t have gotten so... complicated.

On Monday, the Wall Street Journal reported that Deputy Mayor Laura Anglin had fired Esposito the previous Friday, while the mayor was away at the Bernie Sanders Institute in Vermont. But Esposito, who said he had not heard from the mayor, showed up to work on Monday morning anyway.

For hours on Monday, the City Hall press corps pressed the mayor for answers about who, if anyone, was in charge of the Office of Emergency Management, which is charged with handling major disasters and, well, emergencies.

But the mayor did not respond. Dozens of New York City council members voiced support for Esposito, formerly a top NYPD official who oversaw the department's response to the 9/11 terrorist attack.

Then at 10 p.m. on Monday, after meeting with Esposito twice at Gracie Mansion, the mayor released a statement:

“We have started the process of leadership change at New York City Emergency Management. Commissioner Joe Esposito will continue to lead OEM as we conduct a national search for his successor. It is impossible to overstate Commissioner Esposito’s significant contributions to our city’s safety while at OEM and the NYPD. We look forward to exploring additional opportunities for Commissioner Esposito to remain in the administration.”

Speaking to reporters at his monthly crime stats presser on Tuesday, de Blasio acknowledged that the Esposito affair had been mishandled. “There was a lot of confusion in the public domain yesterday,” he said, noting “it was absolutely understandable that there was so much confusion.”

De Blasio said he approved a “leadership change” at OEM weeks ago, before a November snowstorm snarled traffic and left children stranded on school buses for hours. “I want to be very clear that this had nothing to do with the storm,” he said.

The mayor said he wanted a more “strategic approach” at the agency, though he didn’t elaborate beyond a passing reference to new challenges posed by climate change and terrorism. “There were really good skills, attributes,” he said of Esposito, “but there were also things missing for where we wanted to go. “

De Blasio noted that Anglin and Esposito had an “emotional, tense” conversation on Friday that caused a misunderstanding. He said he realizes now that it would have been “smarter” to have had the conversation with Esposito himself. “Obviously something went wrong. I have to take responsibility for that.”

This is not the first time the de Blasio administration has been caught up in unexpected personnel drama. At the end of April this year, Miami-Dade County Public Schools Superintendent Alberto Carvalho accepted and then rejected an offer to become the city’s new schools’ superintendent, during a live television broadcast.

But Esposito said there's no hard feelings between him and the mayor over losing his job. As he left work Tuesday night, Esposito said the awkwardness has been ironed out.

“I serve at his discretion,” Esposito said. “If he decides it's time for me to go, it's time for me to go. He gave me the job, I thank him for giving me the job, he can take it away just as fast as he gives it.”

Esposito said he will stay in office until the mayor finds his replacement.

Additional reporting by Danny Lewis.

Jessica Gould is a reporter in the newsroom at WNYC. You can follow her on Twitter at @ByJessicaGould.