By Kristen Johanson

PHILADELPHIA (CBS) — Testimony has wrapped in the trial of Edward Archer, the man accused of shooting Officer Jesse Hartnett two years ago as he sat in his patrol car in Southwest Philadelphia.

On Wednesday, prosecutors played a videotaped statement that Archer made to detectives after his arrest.

READ MORE: Triple Shooting At Penn's Landing Leaves 3 Teenagers Injured: Philadelphia Police

In the video, Archer is sitting in a hospital gown, and when questioned, he says, “I did what I did because I pledge my allegiance to the Islamic State.”

He goes on to say that police officers enforce a law other than Allah’s law and he will fight against disbelievers.

READ MORE: Philadelphia Weather: Heat Advisory In Effect Until Sunday Evening As Temperatures Hit Record Highs

When asked by the judge if he wanted to testify, Archer refused to answer and said only, “Speak to Allah.”

Prosecutors also called the doctor who tended to Hartnett, an eyewitness whose car was shot, and an investigator who handled evidence found at the scene.

Both the prosecution and defense have rested.

MORE NEWS: Betts Falls Triple Shy Of Cycle, Leads Dodgers Past Phillies

Closing arguments are expected Thursday.