A 21-year-old woman accused of killing her newborn son in the bathtub of her family’s Northwest Washington apartment was ordered Friday to undergo a mental health evaluation.

The suspect, Lillian Alvarado, told her father that the baby was born dead on Nov. 28, but the D.C. medical examiner’s office ruled Thursday that the boy was born alive and then was asphyxiated and dismembered.

“This was a horrific crime that occurred on Thanksgiving Day to an innocent child killed by his mother,” Assistant U.S. Attorney Cynthia Wright said at a D.C. Superior Court hearing, arguing that the suspect is a danger to the community. Alvarado was ordered detained.

On Thursday, D.C. police arrested Alvarado — who lived with relatives in a third-floor apartment in the 6400 block of 14th Street NW — and charged her with first-degree murder and cruelty to children, according to Officer Araz Alali, a police spokesman. The cause of the infant’s death is listed as homicide by asphyxiation and dismemberment.

Authorities said police arrived at the apartment just before noon that November day, summoned by downstairs neighbors who had noticed blood-tinged water leaking through their ceiling. Coming out of the bathroom, Alvarado sat on a bed moments before officers found the body, and she said, “Forgive me,” according to an arrest warrant affidavit filed in court Friday.

Alvarado’s 70-year-old father, Santiago Alvarado, said Friday that family members thought his daughter was taking a shower that morning. He said that she has a history of mental illness and that during episodes, she is unable to communicate.

“She has mental disturbances sometimes, and when that happens, she doesn’t talk,” the father said in Spanish. “She goes out of her mind. The doctors diagnosed her with a sickness.” He did not know the diagnosis.

Of the charges, Santiago Alvarado said: “No, I don’t know what happened, but I don’t think a mother can kill her son. I didn’t see that. I didn’t even know she was pregnant. After this happened, I asked her, and she told me she didn’t know she was pregnant, that she got her period. I don’t want her to be in jail.”

Alvarado came to the United States from El Salvador about a year ago, the father said, fleeing the violence in her native country, where her husband was killed. She made a living cleaning houses in the Washington area, and “she worked very hard,” he said.

Lillian Alvarado has a 2-year-old daughter who was taken by social workers the same day the baby was born, he said. The grandparents have visited her, Santiago Alvarado said.

“I don’t know what we are going to do,” he said. “Only God knows.”

Alvarado was arrested just days after D.C. police charged another mother in Southeast Washington in the death of an infant son. In that case, the woman allegedly gave the month-old boy a fatal dose of a prescription drug used to treat allergies and motion sickness. Both deaths occurred last year but were ruled homicides this month.

Three other District children, two 4-year-olds and a newborn, were reported killed in 2013 in domestic incidents, and D.C. Police Chief Cathy L. Lanier has said that such cases have become a concern.

Court documents and a police report describe a gruesome scene in Alvarado’s small Brightwood apartment, where authorities seized scissors and several knives.

Police said they could not file charges until the medical examiner determined that the infant — identified as Baby John Doe — was not stillborn. Police said the examiner found air bubbles in the infant’s lungs, indicating that he was breathing after birth. The autopsy also found that the newborn’s neck had been compressed, and there were signs of drowning.

Alvarado told police that she knew she was pregnant in April or May, and she believed that by November, she was seven months along, according to court documents. She said she woke up at 6 a.m. with a sharp pain and told others in the home that she was sick from something she ate. She later went into the bathroom, where her water broke.

According to the charging documents, Alvarado said that she got into the shower, thinking she was about to go to the hospital, and that the baby was born there.

The affidavit says she told police that she cut the umbilical cord with scissors and did not hear the baby cry. She told police that she remembers hitting her head on the sink as she got out of the tub and flushing the toilet, but then “everything went dark.”

Relatives told police that Alvarado went in and out of the bathroom all morning, once asking for a pair of pants, another time fetching a plunger from a hall closet.

After police arrived, charging documents say, family members tried to force open the bathroom door. One relative got in and saw bloody water in the tub, the documents say. Alvarado’s 17-year-old brother eventually coaxed her out of the bathroom.

Police describe a horrific scene in the bathroom. According to the court documents, the infant, with the umbilical cord still attached, was in the tub, in about an inch of water, and a pair of scissors was in a sink.

Santiago Alvarado said that his daughter was hospitalized for about a month after the baby’s death and that he just received a bill for $24,000. He said he has not spoken to her since her arrest

Keith L. Alexander contributed to this report.

Get updates on your area delivered via e-mail.