More than 350 inmates escaped an Afghan prison following a coordinated attack by Taliban insurgents, an Afghan official and the Taliban said.

Mohammad Ali Ahmadi, deputy governor of Ghazni province, said Monday that insurgents wearing military uniforms launched a well-organized attack early Monday morning that included using a suicide bomber to breach the compound's walls. Four guards were killed and seven others were wounded, while three insurgents were also killed, Ahmadi said.

Taliban spokesman Zabihullah Mujahid claimed responsibility for the attack on the Ghazni prison in an email sent to the media.

A total of 352 prisoners escaped, Ahmadi said, and only 84 prisoners remain in custody in the prison.

However Ahmadi added that 20 of the prison's most dangerous inmates had been transferred to another facility a day earlier after a fight broke out.