GUATEMALA CITY (Reuters) - At least seven people were killed and 12 others injured on Wednesday after suspected gang members attacked a hospital in the capital in a bid to free a jailed associate who went there under police supervision for a checkup, officials said.

“Anderson Daniel Cabrera, a gang member from the Mara Salvatrucha, was coming for a medical review,” police spokesman Jorge Aguilar said, adding the suspected gang members “are suspected of wanting to rescue him.”

Police arrested five of seven suspected gang members who were armed with assault rifles when they attacked Guatemala City’s Roosevelt Hospital, although Cabrera escaped, Aguilar told reporters.

Cabrera had been jailed since late 2013.

“The search for those responsible will continue and they will see the law enforced. These are terrorist acts,” Guatemalan President Jimmy Morales told reporters.

Among the seven people killed were three security guards and a hospital janitor, said Edwin Bravo, director of the San Juan de Dios hospital where the injured were transferred.

Patients on crutches and in stretchers and wheelchairs were evacuated from the hospital as police officers searched for other attackers. Hallway floors were stained with blood and walls were pocked with bullet holes, according to a Reuters witness on the scene.

Like El Salvador and Honduras, Guatemala struggles with endemic gang violence, especially from the powerful Mara Salvatrucha, also known as MS-13, and its rival Calle 18, who sow terror across Central America.