A Connecticut police chief who received praise for his community policing efforts and was invited to the White House twice in the past year to discuss law enforcement issues has resigned after being disciplined twice for berating people in public.

New Haven Mayor Toni Harp announced Tuesday that Police Chief Dean Esserman resigned by “mutual agreement” effective Sept. 2. She also praised him for the city’s declining crime and violence.

“I’m grateful for the chief’s successful legacy,” Harp said in a statement. “Public safety in New Haven is improved after a return to grass roots community policing, productive partnerships with other law enforcement agencies, and positive interaction with community organizations.”

Esserman has apologized in the past for public outbursts.

He faced a packed room at police headquarters Tuesday afternoon, speaking briefly about his time as chief and the dedication of officers in the city. He said it was “very important” that he give those in attendance the “respect they deserve,” and to let them know in person that he was moving on.

Esserman did not immediately return a phone message Tuesday. He did not mention his troubles in a statement provided by Harp’s office.

“It has been a privilege to serve Mayor Harp and work alongside the remarkable men and women of the New Haven Department of Police Service, who no doubt have earned the title, ‘New Haven’s Finest,'” Esserman said. “Last and certainly not least, it has been my privilege to serve the wonderful people of New Haven.”

Esserman agreed in July to go on three weeks of paid leave and then went on temporary sick leave amid allegations he berated staff at a local restaurant. Two years ago, Harp reprimanded Esserman for his angry confrontation with a Yale Bowl usher.

When he was police chief in Providence, Rhode Island, in 2011, Esserman was suspended without pay for one day for what media reports said was a threat to throw coffee in the face of a sergeant who was coughing during a speech by Esserman.

Officers in both New Haven and Providence voted no confidence in Esserman, accusing him of publicly berating officers, intimidation, favoritism and retaliation, among other things.

Esserman, a Dartmouth College graduate who never served as a rank-and-file officer, is a protege of New York City Police Commissioner William Bratton, former chief of the Los Angeles police and former Boston police commissioner.

He previously served as an assistant prosecutor in Brooklyn, New York, assistant police chief in New Haven from 1991 to 1993, police chief for the Metro-North Railroad and police chief in Stamford, Connecticut. He became New Haven chief in 2011.

Esserman was among 30 law enforcement officials, civil rights activists and other people invited to a White House discussion in July on improving police-community relations. He also attended a White House discussion on reducing incarceration across the country in October.

Assistant Chief Anthony Campbell will continue to serve as Interim police chief in New Haven.