NEW YORK -  Bill Bratton walked out of 1 Police Plaza one last time as police commissioner Friday afternoon after he submitted his formal resignation to Mayor Bill de Blasio.

Bratton walked alongside his wife to heavy applause and cheers from hundreds of officers.

In his resignation, Bratton strongly praised de Blasio, saying, in part, "In leading six different police departments across the country in the past 35 years, I have never been resourced or more fully supported by any mayor."

De Blasio hired Bratton to keep crime low and improve police-community relations. Bratton's newly sworn-in replacement, James O'Neill, says that will continue with an emphasis on neighborhood policing. 

"I'm going to make sure it is fully implemented and we do our best to get to know the people that we took that oath to protect and serve," O'Neill said.

The 68-year-old has been police commissioner since 2014, and previously served in the same role under former Mayor Rudolph Giuliani. He also previously served as chief of transit police.

Bratton is taking a job with the advisory firm Teneo once he leaves the NYPD.