Image copyright AP Image caption The attack on the school last year killed 132 children and injured many more

Pakistan has handed the death penalty to six militants linked to an attack on a school in the northern city of Peshawar in which at least 140 people, mainly children, were killed.

The army said the militants "were given a fair trial" in military courts before the verdict was handed down.

The attack on the Army Public School in Peshawar last December, carried out by the Taliban, shocked the country.

In response, Pakistan lifted a seven-year moratorium on executions.

It also amended the constitution to allow for the establishment of military courts to try terror suspects.

Since December, 200 people have been put to death. Many of them were not convicted for terror offences.

'Fair trial'

A statement on the Pakistan military's website said seven militants were found guilty of links to the attack - only one had been given a life sentence instead of the death penalty.

Image copyright AP Image caption The men who shot the children all died in the assault

"The convicts were given fair trial by following all the legal formalities and offering/providing them legal aid and defence counsels," the statement said.

"Today the sentences of death have been confirmed by the Chief of Army Staff."

These are the first death sentences to be handed out in connection to the Army Public School massacre, the BBC's Shaimaa Khalil reports from Islamabad.

Those facing the death penalty are not the seven who took part in the attack - all of whom died in the assault.

They scaled the walls to get into the school and set off a bomb before moving from classroom to classroom shooting indiscriminately at both the children and teachers.

The school was near a military complex in Peshawar and many of its students were the children of military personnel.

Peshawar, which is close to the Afghan border, had seen some of the worst of the violence during the Taliban insurgency in recent years.