JAKARTA — Soon after midnight on March 23, a group of heavily armed, masked men forced their way inside a prison near the Indonesian city of Yogyakarta and summarily executed four recently arrived detainees with gunshots to the head.

The coordination of the slayings, the professional demeanor of the masked men, and their military-style weapons and communications equipment prompted immediate speculation within the Indonesian news media and among human rights groups and lawmakers that the assailants were members of the military.

An uncharacteristically swift investigation by the army found that nine members of the army’s controversial Special Forces unit, known as Kopassus, were involved in the brazen prison shootings, while two others had come along in an attempt to stop their comrades. The army’s chief investigator in the case said April 4 that the soldiers had confessed to carrying out the shootings for revenge: The four detainees had been arrested in connection with the stabbing death of a Kopassus sergeant during a bar fight in Yogyakarta.

The prison raid has raised questions about what progress has been made in overhauling the Indonesian military since the collapse of President Suharto’s authoritarian rule in 1998 amid pro-democracy protests. During his 32 years in power and after, the military, and in particular Kopassus, has been linked to human rights abuses including extrajudicial killings, kidnappings and torture.