William Bratton's departure comes at a difficult time politically for Mayor Bill de Blasio. He is losing an top official who protected him from critics concerned about public safety, and it raises questions about whether Bratton's decision to leave had anything to do with the investigations swirling around the mayor. Grace Rauh filed the following report.

William Bratton recently said he did not intend to stick around for Mayor Bill de Blasio's second term, should there be one. But the announcement he is leaving in September means de Blasio will be without his highest-profile aide much sooner than expected.

"We knew the day would come," de Blasio said.

Bratton broke the news to de Blasio on July 8, and it appeared to come as a shock.

"After I picked him up off the floor and put him on my couch, we had a two-hour conversation," Bratton said.

"It was the kind of conversation where you want to say, 'What about the team?'" de Blasio said.

Bratton's departure comes as de Blasio is gearing up for re-election. From the start, the police chief seemed to inoculate the mayor against some of his fiercest critics, who were concerned about public safety spiraling out of control. His storied reputation as a crime fighter provided cover to de Blasio as he sought to reform the NYPD and create a rapport between New Yorkers and police. And Bratton helped the mayor navigate an often-tense relationship with rank-and-file officers.

De Blasio has taken his time filling other top administrative positions. But he moved quickly here, hiring from within to project continuity despite a change in leadership at the top.

Somewhat surprisingly, de Blasio did not conduct a national search for Bratton's replacement. Instead, aides said he interviewed just two candidates for the job, and both already worked for the NYPD.

The mayor insisted Bratton's departure is unrelated to the corruption scandal at the police department.

"One hundred and ten percent, has nothing to do with this," de Blasio said.

Hours before Bratton's announcement, de Blasio faced angry police union members who surrounded him as he walked from his favorite cafe in Park Slope to the YMCA, where he works out most mornings. It was a timely reminder of just how fraught policing issues are for this mayor, even with Bratton by his side.