JAKARTA, Indonesia—Inmates at a detention center for terrorists, including Islamic State supporters, killed five police officers and took one hostage, police said Wednesday, in a bloody security breakdown that marked the single deadliest attack against Indonesian police.

Police spokesman Brig. Gen. Muhammad Iqbal said that one prisoner was killed in the fighting and that officials were in negotiations with the other inmates involved in the attack.

The inmates were in possession of at least six firearms taken from the police victims, police said. Police said several of the killed officers had deep wounds on their necks or other parts of their bodies, while at least one was shot in the head.

Inspector Gen. Setyo Wasisto, another spokesman, said police had already granted a demand by the prisoners to meet with Aman Abdurrahman, the de facto leader of Islamic State supporters in Indonesia, who was moved to the facility from another prison last year. Gen. Wasisto declined to specify other demands in the negotiations. He told local MetroTV that the inmates controlled three cell blocks.

The violence erupted late Tuesday when inmates laid siege to part of the facility within the headquarters of the police’s Mobile Brigade Corps on the outskirts of Jakarta. The center houses more than 100 terror suspects and convicted terrorists from across Indonesia, the world’s largest Muslim-majority nation.