A Philadelphia police detective testified yesterday that a teen accused of shooting a Philadelphia Housing Authority police officer confessed to him during questioning a few hours later.

Detective Phillip Mangold testified that he asked Zahir Boddy-Johnson, 17, whether he shot Philadelphia Housing Authority Police Officer Craig Kelley with an assault rifle Feb. 17, 2008, inside the security booth at the Queen Lane Apartments at Queen Lane and Pulaski Avenue in Germantown.

Mangold testified in Common Pleas Court that Boddy-Johnson answered, "I did."

Boddy-Johnson is charged with attempted murder, aggravated assault, and possession of a firearm on a public street.

Under questioning from Assistant District Attorney Deborah Nixon, Mangold said that he interrogated Boddy-Johnson about five hours after the 10 p.m. shooting.

Last week, Kelley testified that he was shot by a masked gunman after he opened the door to the security booth when someone knocked on the door.

Mangold, reading from a signed confession, said Boddy-Johnson, of the 2500 block of Diamond Street, admitted he shot Kelley as he tried to shut the door to the booth.

" 'He tried to close the door and I shot,' " Mangold said Boddy-Johnson told him.

Mangold said the defendant said he shot Kelley because he was trying to steal the officer's laptop computer and service weapon.

At the beginning of the trial Friday, defense attorney Michael Parkinson said he conceded that Boddy-Johnson, who was arrested near the crime scene shortly after the shooting, had the gun. Parkinson said he would contend that Boddy-Johnson did not intend to kill the officer.

Judge Gwendolyn N. Bright yesterday denied a motion by Parkinson to have the attempted-murder charge dismissed. Closing arguments are set for today.

Deitra Chamberlain, who described herself as the defendant's aunt-in-law, testified as a character witness yesterday.

She said that Boddy-Johnson had worked for some members of her church temporarily about 11/2 years ago and that he was peaceful and law-abiding.

Contact staff writer Vernon Clark at 215-854-5717 or vclark@phillynews.com.