Somali military forces staved off heavily armed militants who attacked a high security prison in Somalia's capital Mogadishu on Sunday in what appears to have been a jailbreak attempt, according to authorities. 

All of the attackers, who were "trying to free terrorists held in the prison," were killed, Somali police Capt. Mohamed Hussein told the Associated Press.

The Godka Jilacow prison serves as an interrogation center for the nearby Somali intelligence agency and is believed to be where many suspected militants are being held. 

Although no group had yet claimed responsibility for the attack, local reports said that Al-Shabab militants dressed as military personnel were able to bypass security checkpoints. 

Attackers made their way into the compound after a suicide car bomber detonated explosives, which provided passage for gunmen to make their way toward the prison. A similar tactic was employed by Al-Shabab in July in an attack on the presidential compound

The attack comes one day after the military took the town of Bulomarer from Al-Shabab on Saturday in an ongoing campaign to break up the Islamic militants' strongholds.