The Brooklyn district attorney's office has released the videotaped confession of the teenager accused of starting a fire that killed an NYPD officer two years ago.

Video of Marcell Dockery giving his account of what happened in a Coney Island building in April 2014 played in court Friday.

The fire resulted in the death of Officer Dennis Guerra and critically injured his partner.

Dockery has been charged with second-degree murder, arson and assault.

Dockery says he lit a mattress he saw in the hallway on fire.

Surveillance video of Dockery hanging out in the hallway of the building was also played in court. Prosecutors say it's from the day of the fire.

The trial resumes Monday.

Dockery faces 25 years to life in prison if he's convicted on the murder count.