A Maryland man who opened fire on a police station in 2016, leading to the friendly-fire death of a narcotics detective, was sentenced Thursday to 195 years in prison.

Michael Ford, 25, was convicted in November of second-degree murder, first-degree assault and weapons charges in the killing of Prince George's County Police Detective Jacai Colson. Ford said he was trying to get himself killed by police when he fired his handgun nearly two dozen times outside the station, but didn't intend for anyone else to be harmed.

Prosecutor Joseph Ruddy argued that Ford caused Colson's death by creating a "combat zone." No one was hit by the 23 shots Ford fired, but bullets did strike two passing vehicles and an ambulance, according to Ruddy.

"That was no suicide mission. That was a mission to kill cops," the prosecutor said during the trial's closing arguments.

This undated photo provided by the Prince George's County Police Department shows officer Jacai Colson, a 4-year veteran of the Maryland county's police force. A gunman fired outside a Maryland police station on Sunday, March 13, 2016, prompting a gun battle that killed Colson and wounded the suspect, authorities said. (Prince George's County Police Department via AP)

Jacai Colson. (Prince George's County Police Department via AP)

Colson, 28, exchanged gunfire with Ford before a fellow officer fatally shot the plainclothes detective, mistaking him for a threat. Officer Taylor Krauss testified that he never saw Colson hold up a badge or heard him identify himself as a police officer before shooting him once in the chest. Colson's parents sued Krauss and Prince George's County, accusing Krauss of recklessly firing his rifle. Colson and Krauss had worked in the narcotics unit together and sat at connecting desks.

PHILADELPHIA MAN DEAD AFTER HE WAS PUNCHED AT DOG PARK, POLICE SAY

Ford's brothers, Malik and Elijah, recorded cellphone videos of the ambush after dropping him off at the station in Landover, a suburb of Washington, D.C. They agreed to film the shooting so the video could be sent to WorldstarHipHop.com, a website known for posting users' violent videos, a police detective testified in 2016.

From left, Michael Ford, Malik Ford and Elijah Ford. (AP)

One of the videos showed Ford screaming obscenities and shouting, "Do something!" between shots. Ford, then 22, also dictated his last will and testament on video minutes before his brothers dropped him off at the station.

Malik and Elijah Ford pleaded guilty to related charges and were sentenced to 20 and 12 years in prison, respectively.

Michael Ford said he was hearing voices in his head on the day of the shooting. He said he retrieved a gun from a safe in his car and held it to his head.

CLICK HERE TO GET THE FOX NEWS APP

"I couldn't pull the trigger," he testified at trial.

Trial judge Lawrence Hill Jr. ruled before the trial that Ford couldn't present an insanity defense despite his serious mental health issues.

The Associated Press contributed to this report.