A 13-year-old girl pleaded guilty in juvenile court Thursday to second-degree murder in the fatal carjacking of a food delivery driver in the District, a month after her admitted accomplice, a 15-year-old girl, pleaded guilty as a juvenile to felony murder.

Their plea agreements with the D.C. attorney general’s office brought a quick end to the prosecution phase of a case that began March 23, when the botched carjacking resulted in a crash near Nationals Park that killed the victim, a 66-year-old Uber Eats driver.

Along with murder charges, the two girls initially were accused of several related crimes, including armed robbery and carjacking. The other charges were dismissed by authorities in return for the guilty pleas.

Because they were prosecuted as juveniles in D.C. Superior Court, they cannot be sentenced to prison but instead face possible confinement in a youth detention facility, where each can be held only until her 21st birthday. The girls could be freed sooner if the city’s Department of Youth Rehabilitation Services decides they are no longer dangerous.

The 15-year-old girl, who pleaded guilty in May, is to be sentenced Friday. Judge Lynn Leibovitz scheduled the other teenager’s sentencing for July 6.

Police said the girls were armed with an electronic stun device when they carjacked a Honda Accord outside the Navy Yard-Ballpark Metro station. Moments later, near Nationals Park, the driver, Mohammad Anwar, wound up standing outside his car, with the 15-year-old in the driver’s seat and the other girl in the front passenger seat.

As Anwar was trying to force his way back into the Honda, police said, the 15-year-old stepped on the gas pedal and the car accelerated down the block. Anwar was “hanging outside the car” through the open driver’s door during the struggle and was fatally injured when the vehicle struck a tree and overturned, police said.

Under D.C. law, the girls have not been publicly identified by authorities because of their ages, and their court hearings have been closed to the public. The Washington Post has been allowed to watch the girls’ court appearances via video after agreeing not to report identifying information about them.

Anwar’s family has declined to comment on the prosecution of the case. After the girls were arrested, his relatives said in a statement that Anwar immigrated to the United States from Pakistan in 2014 “to build a better life for himself.”