A court-martial sentenced dozens of officers and soldiers to one up to two years of imprisonment on Monday following a deadly attack on a military base in northern Afghanistan.

Top military officials including the 209 Shaheen Corps commander and executive commander are among those trialed for negligence on their duties after 10 Taliban fighters breached in the army corps and killed more than 300 people and wounded dozens of others.

The attack occurred on April 21 when unarmed soldiers were leaving Friday prayer or eating lunch. The Taliban claimed responsibility for the attack, saying the assailants were let by four infiltrator soldiers.

Afghan defense ministry deputy spokesperson, Mohammad Radmanish, said that about 488 army personnel were investigated and only eight of them were not found guilty.

He added that the base commander, Major General Mohmand Katawazi, and the executive commander of the base were each sentenced to one year suspended sentence.

Reports suggest that at least 99 Afghan national army members were charged to two years in prison while some charged to one year in prison for the same allegation. The cases have been referred to the appeals court for further consideration.