NEW YORK - NYPD Commissioner Bill Bratton stepped down today as the city's top cop, bringing to an end a decades-long career in law enforcement around the country.

Bratton's second stint as commissioner began in 2014. The 68-year-old will be replaced by the current Chief of Department James O'Neill.

Bratton previously served under Mayor Rudy Giuliani in the mid-1990s. He also served as commissioner in Boston and Los Angeles.

Bratton released a letter to the mayor's office today saying in part, "I have never been better resourced or more fully supported by any mayor. From equipment, to training, to technology, to policy, you have stood by the NYPD and made much of what we have accomplished possible."

The letter goes on to say, "Thank you again for the extraordinary privilege and opportunity to serve you and the citizens of New York and, for the second time, to serve proudly alongside the greatest cops on earth."

Bratton's retirement officially goes into effect Sunday at midnight. A "walk-out" ceremony was held for the exiting commissioner Friday afternoon at 1 Police Plaza.