A 1-year-old boy whose mother locked herself in a restroom with him at a restaurant in Midtown Manhattan on Monday was declared dead at Bellevue Hospital Center, where he was taken after workers who unlocked the door found him unconscious and foaming at the mouth, the police said.

The woman, Latisha Fisher, 35, was detained by officers as an investigation was opened into the boy’s death, the police said.

The police said Ms. Fisher entered 5 Boro Burger at 976 Avenue of the Americas, at 36th Street, with the boy. She went directly to the restroom and locked the door behind her, they said.

After a while, restaurant workers went to check on her, and then used a key to enter the room.

A worker who opened the door tried to perform CPR on the boy, the police said, but the mother blocked him.

The workers called 911 around 2:30 p.m., the police said. Officers from the Midtown South Precinct responded to the call about a child in cardiac arrest at the restaurant, the police said. The boy, Gavriel Ortiz-Fisher, who was 20 months old, was taken to the hospital, where he was pronounced dead. The police were awaiting the results of an autopsy to be performed by the medical examiner’s office.

Ms. Fisher was taken for questioning to the Midtown South Precinct station, the police said. No charges had been placed as of late Monday.

Officials said the boy’s father, who was not present at the restaurant, was at the Seventh Precinct station being told what had happened.

Police investigators remained at the scene on Monday evening talking to people inside the restaurant. At one point, an officer opened the door to the restroom, revealing a child’s stroller inside.

In September 2011, Ms. Fisher was arrested on charges of assault and criminal possession of a weapon. It was unclear how that case was resolved.

Officials did not say whether child welfare authorities had prior contact with the family. In a statement, the Administration for Children’s Services said the agency was aware of the boy’s death and was planning to investigate.

Sofia Pacheco’s mother lives at the Samuel Gompers Houses at 60 Pitt Street on the Lower East Side of Manhattan, where Ms. Fisher and Gavriel’s father also live. Ms. Pacheco said she often saw the family coming and going from the building with the child in tow. She said she never saw anything to indicate there was a problem.

The boy’s father was very close to the baby, whom the family called Manuel, she added.

“I’m in shock,” she said.

Josefina Deleon, 54, who lives at 60 Pitt Street, said Ms. Fisher was a doting mother to her young son.

“She was crazy with that baby; she always took care of him,” Ms. Deleon said. “It hurts.”

She said Ms. Fisher also has an older son, who is a preteenager.

Jiovanni Montero, 21, who also lives in the building, said he often saw Ms. Fisher with the boy and his father. Through the summer, the parents often took the boy to the courtyard in his stroller for fresh air and fun.

Mr. Montero, who said he sometimes played ball in the courtyard with the older son, played with the baby.

“I would make faces, he would laugh,” Mr. Montero said. “It really does break my heart. I always thought the mother was good.”

Mr. Montero added that starting around Halloween, Ms. Fisher and the father began having public fights. In one, Mr. Montero heard her ask him how she was supposed to cope if he was not going to be around.

“I always used to see them arguing back and forth,” he said.

Two uniformed police officers sat on chairs on the 14th floor of the building, where Ms. Fisher lives, because of the investigation.

Nate Schweber contributed reporting.

A version of this article appears in print on , on Page A19 of the New York edition with the headline: Boy Locked in Restroom With Mother Later Dies. Order Reprints | Today’s Paper | Subscribe