Pakistani military courts have sentenced seven Islamic militants to death over a series of attacks, including an assault on an army-run school that killed more than 150 people, the army said Thursday.

Another militant was sentenced to life in prison, according to an army statement. It said six were members of the militant group Tawhid-wal-Jihad, while the other two were from the Pakistani Taliban and Jaish-e-Mohammad. Army chief Gen. Raheel Sharif confirmed the sentences, but it was unclear when they would be carried out.

Tawhid-wal-Jihad was established in the late 1990s by Abu Musab al-Zarqawi, who went on to lead al-Qaida's Iraq affiliate, a precursor of the Islamic State group, before he was killed in a U.S. airstrike in 2006.

Pakistan's military says the men belonging to Tawhid-wal-Jihad played a major role in planning and facilitating the school attack and several others. But the school attack was claimed by the Pakistani Taliban, a homegrown militant group.

Pakistan has launched a number of military operations against the Pakistani Taliban, but has also been accused of turning a blind eye to other Islamic militant groups seen as allies against archrival India and as a way of projecting influence in neighboring Afghanistan. Islamabad and Kabul have long accused each other of sheltering militants involved in cross-border attacks.

The attack on the school in Peshawar, in which nearly all the victims were schoolchildren, shocked Pakistanis and led the country to lift a moratorium on executions in place since 2008. Pakistan's parliament then amended the constitution to allow military courts to try civilians in terrorism cases. The Supreme Court upheld the use of such trials earlier this month.

The army said the trials were fair and that the accused can appeal their convictions.