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.

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.

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.

Closing arguments are expected Thursday.