Video showing an unarmed black motorist pulled out of his car and then repeatedly punched in the head by police in Michigan surfaced months after the incident sent Floyd Dent to the hospital.

But after the dashboard camera footage aired on WDIV-TV, state officials launched two investigations, and on Monday, prosecutors filed two felony charges against former Inkster police officer William Melendez.

“The job of a peace officer can be dangerous, but we cannot tolerate those who abuse their authority, violate their oath and prey on citizens rather than protect them,” Wayne County Prosecutor Kym Worthy said at a Monday news conference. “We cannot turn our heads when the law enforcement becomes the law breaker.”

Melendez, 46, has been charged with misconduct in office/mistreatment of a prisoner, which carries a maximum sentence of five years, and assault, which carries a penalty of up to 10 years.

A police union representative, Al Lewis, told the Associated Press that Melendez is “a little shaken” and is getting an attorney.

Footage of the violent January arrest shows an officer pulling Dent, 57, out of the car. Then another officer puts him in what appears to be a chokehold and repeatedly punches him in the head. Other officers arrive, and a stun gun is used on Dent three times. Dent said he spent two days in the hospital with head and face injuries after the police encounter.

Dashcam video from Jan. 28 shows an Inkster police officer punching Floyd Dent in the head while another officer tries to handcuff him. (Inkster Police Department)

The charges against Melendez come at a time when video footage of violent police interactions with unarmed civilians garner national attention and debates continue as to the utility of body cameras worn by officers. In South Carolina, bystander footage of an unarmed black motorist fatally shot by a white officer this month prompted officials to outfit all of their officers with body cameras.

Worthy said her office found out about the incident the same way the public did — not by the Inkster department or Dent’s attorney, but by a news report airing the dashboard camera footage, provided by Dent’s attorney. “We probably wouldn’t know about” the incident had the video not been aired, she said.

Dent “was overcome with emotion, cried and was obviously relieved” by Worthy’s announcement, his attorney, Gregory Rohl, told the Detroit Free Press. “Without that video, and without you showing it, Inkster wouldn’t have done anything,” Rohl told reporters.

Rohl said that Dent is also seeking a monetary settlement with the city of Inkster and that they would file a civil lawsuit if negotiations break down, Michigan Live reported.

Police charged Dent with possession of cocaine, which he claimed was planted by police. Worthy said that remaining cocaine charge would be dropped “in the best interests of justice,” but she declined to comment on whether Dent’s claims were true.

Dent had also been charged with resisting arrest, which a judge had dismissed in March. In the arrest report, provided by Rohl to AP, police write that Dent failed to pull over and ran a stop sign in a neighborhood known for drug activity. After Dent pulled over, an officer approached with his gun raised because he thought Dent was reaching for a weapon, the report read. Police used a Taser three times and Dent bit an officer on the arm, the report read.

Police had also alleged that Dent verbally threatened officers.

When the video was made public in March, Inkster Police Chief Vicki Yost said her department launched an inquiry immediately after Dent’s arrest and pulled one officer from patrol duty. She said the department requested Michigan State Police to launch an independent investigation.

Michigan State Police began investigating on March 23 and turned the results over to prosecutors, who then launched their own investigation, Worthy said. The charges are based on a review of police and televised video, witness statements, interviews with other officers on the scene, photographs of Dent’s injuries and statements by Dent, Worthy added.

Worthy said they reviewed whether to charge other officers but went with the two felony counts against Melendez. No additional charges are expected.

Last week, Inkster fired Melendez, who had been on the force since 2010. “I consider myself to be a political speed bump, with all of the law enforcement negativity that is surrounding this country,” Melendez told WXYZ-TV on Thursday. “Politicians are not police officers, civilians are not police officers, and it is a very stressful job where you have to make split-second decisions.”

Melendez’s police work has come under scrutiny before, as the Detroit News reported. He and six other Inkster officers are subjects of a pending lawsuit related to a 2011 arrest in which the defendant claims he was chocked and beaten unconscious by officers. In 2003, Melendez and 18 Detroit officers were indicted in a case involving planting evidence and assault.

Worthy said she was aware of Melendez’s background but wouldn’t comment further.

Inkster officials declined to further discuss the case Monday, citing ongoing and active “civil actions” relating to Melendez’s employment.

“Officer Melendez’s employment with the Inkster Police Department was terminated April 15, which we believe was in the best interest of our community,” City Manager Robert Marsh said in a statement Monday. “We acknowledge Prosecutor Worthy’s charging decision and will cooperate with the Prosecutor as requested.”

As to why prosecutors weren’t informed of the case by Inkster, Worthy declined to issue any critique of the department.

“I’m not here to indict the Inkster Police Department,” she said.