A former Boston police officer who was beaten more than 25 years ago by colleagues who mistook him for a shooting suspect will be the new leader of the city's police department, Mayor Michelle Wu announced Wednesday.

Michael Cox, 57, will return to his hometown of Boston after working as the police chief in Ann Arbor, Michigan, to lead of the same force he once brought a civil rights case against over his beating by fellow cops. Cox, who is Black, will take over as commissioner next month.

Cox described his appointment is an "emotional moment" for him, apologizing during a call with reporters for his voice quivering. He promised to work to diversify the police department — which critics have long complained doesn't look enough like the city it serves — and make sure officers feel supported in their job to protect the community.

MASSACHUSETTS PROFESSOR INDICTED IN ALLEGED DRUNK DRIVING DEATH OF BOSTON COP BOYFRIEND

"I think this is a very exciting time. I think the officers need someone to support them," Cox told reporters Wednesday. "And I’m going to be their biggest cheerleader."

Before becoming chief in Ann Arbor in 2019, Cox was part of the Boston police force for 30 years, where he rose through the ranks after fighting for years to get justice over his beating that left him seriously injured at the age of 29.

Cox was working undercover in plainclothes as part of the gang unit in January 1995 when officers got a call about a shooting. Cox, dressed in jeans and a sweatshirt, spotted the suspect and started to chase him. The suspect started to scale a fence and Cox was struck from behind just as he was about to grab the man, Cox said. He was kicked and punched by fellow officers, suffering head injuries and kidney damage.

"It was humiliating what happened to me," Cox told former Boston Globe reporter Dick Lehr for Lehr's book about the beating: "The Fence: A Police Cover-Up Along Boston’s Racial Divide."

"There’s no reason to treat anyone like that. And then to just leave them. And if they do it to me — another police officer — would they do it to another person if they got away with it?" Cox said.

BOSTON POLICE WARNS OF UPTICK IN DRINK-SPIKING, 'ROOFIE' DRUGS AT KICK-OFF TO SUMMER

Cox has described facing harassment in an effort to silence him after the beating became public despite efforts by his colleagues to cover it up. A department injury report said Cox lost his footing on a frozen puddle, causing him to fall and crack his head.

Cox chose to stay in the police force after what happened to him and try to improve things instead of walking away from a job he loved, he said Wednesday.

Michael Cox

Michael Cox, left, has been named as the next Boston police commissioner. (AP Photo/Steven Senne)

"Since then in 1995, I have dedicated my life to making sure that both the Boston police department and policing in general has grown and learned ... to make sure that we have structures and mechanisms in place to make sure that we never repeat that kind of incident against anyone," Cox told reporters.

The top prosecutor for Boston and surrounding communities, who has known Cox for years, called him "a man of high honor and integrity."

"The journey of Michael Cox from being beaten by fellow Boston Police officers to his appointment as Commissioner of the Boston Police Department is emblematic of criminal legal reform," Suffolk County District Attorney Kevin Hayden said in an emailed statement.

Cox's tenure in Ann Arbor was marred by claims that he created a hostile work environment, which led to him being briefly placed on administrative leave in 2020.

An investigation found "no evidence that the Chief was behaving in such a way" as to create a hostile work environment. But a report said "there is evidence that people feared retaliation by the Chief, and they had a legitimate basis for that fear, whether or not that was the Chief’s intent."

BOSTON POLICE SHOOT, KILL KNIFE-WIELDING SUSPECT WHO ALLEGEDLY STABBED OFFICER

He was reinstated less than a month after being placed on leave after being told by the city administration to apologize "for any misunderstandings and poor communications."

The mayor said the vetting process was intense and that she personally spoke with Ann Arbor's mayor and town administrator about Cox's time there. Those conversations confirmed that he is a "leader of great integrity," Wu said.

"We are tremendously excited to bring a leader of his experience and wisdom and background to Boston in this role," she told reporters.

In Boston, Cox spent 15 years in a variety of roles in the police force's command staff, including as the Bureau Chief and Superintendent of the Bureau of Professional Development. He oversaw the Boston Police Academy, the Firearms Training Unit, the Police Cadet Unit, and training for recruits and sworn officers.

Boston's last commissioner — Dennis White — was fired last year following a bitter battle to keep his job after decades-old domestic violence accusations came to light.

BOSTON POLICE UNIFORMS STOLEN AHEAD OF MARATHON; FBI, MASSACHUSETTS COPS OFFERING $5K REWARD FOR SUSPECTS

White was placed on leave over the allegations, which he denied, just days into his new job. Superintendent-In-Chief Gregory Long has been serving as the acting police commissioner during the search for White's permanent successor.