LOCKPORT, NY-- A Niagara County teen has admitted his role in a fatal fire at a Lockport recycling center.

The teen, who is not being named due to his age, pleaded guilty to burglary and arson. That 14-year-old defendant went before the judge admitting to the most serious charge in this case of arson. He did not plead guilty to criminally negligent homicide.

The massive fire at the High Tread International plant in Lockport back in August killed 14-year-old Joseph Phillips. The two teens, who were best friends, went in there to start fires. The defendant fled the area but Phillips remained inside.

During this trial the county attorney's office claimed that the defendant recklessly caused the death of Phillips.

The defense denied that all along saying it was Phillips' idea to start the fire and his choice to stay inside.

However, a plea deal was agreed to today that both the victim's family and the defendant's family agreed to.

The court also saw the last moments of Phillips life, through videos from the defendant's cell phone showing the teens lighting fires inside the plant. And, a large portion of the defendant's interview that he gave Lockport police was also shown. The rest of it will be played Friday and then, the judge is expected to determine the teen's punishment. He could get as little as probation or up to 18 months in a juvenile detention facility.