The gunmen who killed at least 27 people in an unregistered drug rehabilitation center in the central Mexican state of Guanajuato last week were looking for someone in particular, state prosecutors said Monday.

In a statement, the Guanajuato state prosecutor’s office said that three suspected gunmen were in custody and allegedly belong to a criminal organization operating in the area, though the agency did not specify which group.

The men arrived at the two-story rehabilitation center in Irapuato Wednesday evening and forced their way past women on the ground floor. Upstairs they burst into the room holding the center’s male patients and made them all lay face down on the floor. They asked if they knew where a certain person was and when the men answered no, the gunmen opened fire, the statement said. It did not identify the person being sought.

Rosa Alba Santoyo speaks on the phone and is embraced by a woman giving her condolences the day after she lost three of her adult children in an attack on the drug rehabilitation center where they were being treated, at her home in Irapuato, Mexico, Thursday, July 2, 2020. Gunmen burst into the drug rehabilitation center and opened fire Wednesday, killing 24 people and wounding seven, authorities said. After the loss of her three children, only two of Santoyo's seven children remain living. (AP PhotoEduardo Verdugo)

Rosa Alba Santoyo speaks on the phone and is embraced by a woman giving her condolences the day after she lost three of her adult children in an attack on the drug rehabilitation center where they were being treated, at her home in Irapuato, Mexico, Thursday, July 2, 2020. Gunmen burst into the drug rehabilitation center and opened fire Wednesday, killing 24 people and wounding seven, authorities said. After the loss of her three children, only two of Santoyo's seven children remain living. (AP PhotoEduardo Verdugo)

The gunmen killed 21 men upstairs in that room and three more they encountered on their way out downstairs. Three more who were wounded have since died of their injuries.

The state is the scene of a bloody turf battle between the Jalisco New Generation Cartel and a local gang - the Santa Rosa de Lima Cartel - and the state has become the most violent in Mexico.

A window is broken at the drug rehabilitation center that was attacked in Irapuato, Mexico, Thursday, July 2, 2020. Gunmen burst into the center and opened fire Wednesday, killing 24 people and wounding seven, authorities said. (AP PhotoEduardo Verdugo)

A window is broken at the drug rehabilitation center that was attacked in Irapuato, Mexico, Thursday, July 2, 2020. Gunmen burst into the center and opened fire Wednesday, killing 24 people and wounding seven, authorities said. (AP PhotoEduardo Verdugo)