A 14-year-old District youth admitted in court Thursday that he fired shots into a crowd outside the National Zoo during the annual Easter Monday celebration, injuring two other teenagers.

The youth pleaded guilty in D.C. Superior Court to seven charges, including assault with a deadly weapon and possession of a handgun, in the afternoon shooting April 21. The Washington Post was permitted to attend the hearing on the condition that it not identify the youth, who was charged as a juvenile.

After the teen’s arrest May 3, D.C. police said he was a member of the Southwest Crew, a gang in Southwest Washington, and was outside the zoo when he encountered members of the Kentland Crew, a rival gang from Prince George’s County. The teen pulled out a handgun and fired into the crowd, police said. A 16-year-old was shot in an elbow, and an 18-year-old was shot in a hand.

“We are very fortunate. This could have been a much different scenario,” prosecutor Michelle Hersh said in court.

The teen initially faced 13 counts, but prosecutors agreed to drop six — including two counts of first-degree attempted murder — in exchange for the guilty plea. He is scheduled to be sentenced in July and faces a maximum sentence of being placed in the custody of the Department of Youth Rehabilitation Services until age 21.

During Thursday’s hearing, the teen appeared in court with his public defenders, his mother and his godmother.

One of the teen’s attorneys, Jessica Willis, asked that her client be allowed to go home with his mother until sentencing. Willis cited letters from several people who wrote that the teen’s behavior and schoolwork had improved in the seven weeks since his arrest. The teen’s attorneys also said they plan to ask the court at sentencing to release him from custody and place him on probation.

But Hersh encouraged Judge Danya A. Dayson to order psychological, medical and violence-risk assessments before sentencing to determine what his needs would be if released and what risks he might pose to society.

Prosecutors also seemed concerned about a report that the teen was not regularly taking his mental health medication while in custody at a youth center. Willis said he took his medication when he was at home with his mother and would continue taking the medication should he be released.

Dayson ordered the evaluations and praised the teen for the progress he has made since his arrest.

In 2011, the teen was charged with robbery while armed in an incident involving a knife. Prosecutors later dropped that case. Last year, he was charged with felony threats. He pleaded guilty to misdemeanor threats and was placed on 30 days’ probation, which a court social service worker said the youth completed successfully.

But the judge noted the teen's probation ended just two months before the April shooting.

Dayson also said she was concerned about a “dramatic escalation” in the teen’s violent behavior. “These are very serious allegations that involved very risky behavior,” she said.

Get updates on your area delivered via e-mail