Image copyright AFP Image caption Muslim Khan was the face of the Swat Taliban for many months

A military court in Pakistan has sentenced a top Pakistani Taliban leader from the Swat region to death.

Muslim Khan, a former spokesman for the militants, was convicted of killing 31 people, including civilians and security personnel, the military said.

He is among eight "terrorists" whose death penalty was confirmed by army chief Gen Qamar Javed Bajwa.

The military courts were set up in the aftermath of the 2014 Peshawar school massacre. Their term expires next week.

Others whose convictions were confirmed by the army chief on Wednesday include four gunmen sentenced for involvement in a 2015 bus massacre of Ismaili Shias in Karachi, and the assassination of social activist Sabeen Mahmud, also in Karachi the same year.

Why 'butcher of Swat'?

Muslim Khan, 62, started out as a student activist of a left-wing secular party in the 1960s, but underwent an ideological transformation in the early 1990s when a pre-Taliban Islamist movement briefly emerged in his native Swat region.

In 2007, he became the chief spokesman of the Swat Taliban, and was the movement's public face during its stranglehold over the region which continued until the winter of 2009.

His forceful defence of the Taliban's policy of killings, beheadings and the destruction of schools in Swat earned him and Swat Taliban chief Mullah Fazlullah the title of "butchers of Swat".

The military's statement described him as "a spokesman of a proscribed organisation [who] was involved in killing innocent civilians, attacking armed forces and law enforcement agencies of Pakistan".

Image caption Muslim Khan, pictured in 2009 after his arrest

These attacks resulted in the death of 31 people and injuries to 69 others, the statement said, adding that he was involved in "slaughtering" four soldiers.

"He was also involved in kidnapping two Chinese engineers and a local civilian for ransom. The convict admitted his offences before the Magistrate and the trial court. He was awarded the death sentence."

A former BBC Urdu correspondent, Abdul Hai Kakar, who met him in September 2009, reported that he spoke several languages, including Urdu, English, Arabic and Persian, in addition to his mother tongue Pashto.

He had lived in or travelled across more than a dozen countries in the Middle East, Europe, the US and the Far East.

He has been in custody since his arrest in 2009 during the military operation that drove the Taliban out of Swat.

Was the trial fair?

The military court trials are held in secret, and prisoners on trial are held in internment centres run by the military, away from the mainstream jail population.

Scores of suspects have been convicted by the military courts since they were set up in January 2015 - obtaining accurate information is difficult because secrecy makes it almost impossible to scrutinise the process.

Dawn newspaper said more than 270 cases had been sent to the military courts in the past two years. They gave death sentences to 161 people, while 116 were given jail terms, mostly life sentences.

A report by the Geneva-based International Commission of Jurists (ICJ) in June had a lower figure, saying the military courts had convicted 81 people during the 18 months of their existence.

Image copyright Reuters Image caption The attack on the Army Public School in Peshawar was the deadliest militant attack in Pakistan's history

So far only 12 suspects have been executed by the military courts.

Others have gone to the courts to challenge the fairness of the trials, but judges have failed to intervene.

The ICJ has accused the Pakistani authorities of failing to make public key information about the trials, with similar objections raised by the Human Rights Commission of Pakistan (HRCP) and other groups.

The BBC asked the Interior Ministry for information on cases tried by the military courts but has not yet received a response.

What happens to military courts now?

The convictions made public on Wednesday are believed to be the last by military courts before their legal term expires in January 2017.

It is not clear if their term will be extended.

Elements within the military want the term of the military courts extended, believing the government is not up to dealing with terrorism-related offences.

But rights groups and some political circles say law and order has improved and the justification for military courts no longer exists.