A woman pregnant with twins who was shot last week in front of a Northeast Washington carryout went into labor Saturday at a hospital, and both babies died, according to the woman’s mother and D.C. police.

The newborns were taken to the medical examiner’s office, where rulings on the causes of death were pending Tuesday, according to a spokeswoman. The mother, Lakira Renee Johnson, 21, survived.

Johnson’s mother, Cassandra Johnson, 42, said Tuesday that her daughter unexpectedly went into labor at MedStar Washington Hospital Center. She said the twins were born alive and lived long enough to be named Heaven and Nevaeh — “Heaven” spelled backward.

The elder Johnson said her daughter underwent additional surgery Monday to repair damage, caused by the bullet that struck her in the stomach, that could not be addressed until after the twins’ birth. “She is in a lot of pain,” her mother said. A hospital spokeswoman declined to comment beyond confirming the deaths, citing the family’s wishes.

D.C. police said Johnson was shot about 10 p.m. Aug. 30 as she emerged from a store in the 1300 block of Brentwood Road NE. Relatives said she had walked to the store to get a cheesesteak; police described her as a bystander who was not targeted by the gunman. A man also was shot and critically injured.

Police said they are investigating whether whoever opened fire outside the carryout on Aug. 30 was shooting in retaliation for earlier violence in the area.

The District does not have a fetal homicide law, and police have put the gestational age of the twins, the length of the pregnancy, at 21 to 22 weeks, less than what doctors typically have determined to be viable.

No arrest has been made in the Johnson case, but authorities are examining the particulars of the case and what charges could be sought if a suspect is arrested. Bill Miller, a spokesman for the U.S. attorney’s office for the District, said his office is “researching the issue” and would not comment further “because the investigation remains active.”

In some states, prosecutors can seek murder charges in the death of a fetus. Some states require that the fetus be viable, but many leave open the definition of “viable.” In 2012, the D.C. medical examiner ruled the death of Kuron Rashad Hunt a homicide. The infant was delivered by emergency Caesarean section and pronounced dead after his mother, who was eight months pregnant, was stabbed in the abdomen in Southeast. No arrest has been made.

Sonia M. Suter, a law professor at George Washington University, said it could be difficult to bring charges if the fetuses were 21 or 22 weeks old when they were born. “It’s right in that gray area,” said Suter, whose emphasis is legal issues pertaining to medicine. She noted that the line defining viability changes as technology improves but cautioned that “not many people would call 21 weeks viable.”

Last week, Johnson’s mother and sister were optimistic that the fetuses would survive. The mother said the bullet had barely missed her daughter’s uterus. Lakira Johnson has two other daughters, ages 3 and 7.