NEW YORK (AP) — A New York City man has been arrested in connection with the death of a 3-year-old girl who got caught inside a sofa bed.

Fifty-year-old Mohamed Barry was charged with endangering the welfare of a child. Police say he was supposed to be watching Aissante Diallo and her 10-year-old sister when the accident occurred Monday at a Harlem apartment.

Barry is the boyfriend of the girls’ mother. Information about his lawyer wasn’t immediately available.

The Daily News says Barry told police he had stepped out of the apartment for about 10 minutes.

Police say the sofa bed folded up when the sisters were on it, trapping them. The older girl managed to get out.

Aissante was pronounced dead at a hospital. The medical examiner will determine the cause of death.