A D.C. Superior Court judge Monday ordered that a 15-year-old teen accused of shooting a D.C. police officer Saturday be confined to the District’s juvenile detention center to undergo a 24-hour psychological and competency evaluation.

After a nearly three hour-hearing, Magistrate Judge Diana Harris Epps ordered that the teen be held with the District’s Department of Youth Rehabilitation Service and undergo the forensic exam before another hearing Tuesday in D.C. Superior Court.

Prosecutors with the D.C. attorney general’s office charged the teen with 11 counts, including attempted first-degree murder while armed, assault with intent to kill, assault on a police officer and aggravated assault with a dangerous weapon.

The Washington Post was allowed to cover the hearing on condition the teen, who is being charged as a juvenile, was not identified.

The teen was arrested Saturday after he allegedly shot a police officer who responded to the 700 block of Crittenden Street NE for a report of man with a gun at around 5:15 a.m.

When uniformed police arrived, authorities said, they found the teen on the awning of his apartment armed with a .38 revolver.

One officer was struck three times — in the neck, the shoulder and his chest. The officer was wearing a protective vest. The officer was listed in stable condition at a local hospital.

Another officer was grazed in the shooting.

The teen’s left elbow was grazed by a bullet.

During the hearing, Detective John Bevilacqua, testifying on the basis of police reports, said that the teen’s mother called police and that four officers responded to assist with a “person out of control” call. Bevilacqua said the teen climbed out of a window onto the metal awning in the rear of the building. He said an officer approached the teen and gave several orders for the youth to drop the gun. Bevilacqua testified that police said the teen began shooting and the officers fired back.

The officer who had given orders to drop the gun was the one hit three times.

The teen then jumped from the awning into a neighbor’s lawn. A resident in the area pointed to a house where the teen was found underneath a porch with a gun next to him, according to testimony.

Wearing a white T-shirt, gray sweat pants and socks, the teen sat next to his attorney during the hearing, often with his head bowed in his hands. His wrists and ankles were shackled. A quarter-sized, bleeding cut was visible on his left elbow.

Bevilacqua testified that the gun found next to the teen under the porch held five empty bullet casings. The teen allegedly told a police officer after leaving a hospital where he was examined that he was “sorry for what I’ve done.”

Under cross examination by the teen’s attorney, Tejal Kothari of the District’s Public Defender Service, Bevilacqua said it was unclear who fired first, the officers or the teen. Bevilacqua also said no one saw the teen point or fire the gun. The detective said the investigation, including an analysis of bullet casings found at the scene, was ongoing.

None of the teen’s family members was permitted into the hearing; they sat outside the courtroom. Epps ordered the media out of the courtroom when details of the teen’s family and environment were being discussed. Those details ultimately led to Kothari to request the evaluation that the judge ordered.