A Pakistani court has sentenced former military ruler Pervez Musharraf to death in absentia for treason over his 2007 imposition of emergency rule.
Such a verdict is a first in a country with a history of army rule. The military reacted angrily, saying legal process "seems to have been ignored".
The general seized power in a 1999 coup and was president from 2001 to 2008.
The penalty is unlikely to be carried out. Gen Musharraf was allowed to leave Pakistan in 2016 and is in Dubai.
The high treason charge has been pending since 2013. It relates to Gen Musharraf's suspension of the constitution in 2007, when he declared an emergency in a move intended to extend his tenure.
The 76-year-old says he is receiving medical treatment in Dubai. He issued a video statement from a hospital bed earlier this month, describing the case against him as "baseless".
Three judges at the special court in Islamabad found him guilty by two to one.
What is the case about?
In November 2007, Gen Musharraf suspended the constitution and imposed emergency rule - a move which sparked protests. He resigned in 2008 to avoid the threat of impeachment.
When Nawaz Sharif - an old rival whom he deposed in the 1999 coup - was elected prime minister in 2013, he initiated a treason trial against Gen Musharraf and in March 2014 the former general was charged for high treason.
Gen Musharraf argued the case was politically motivated and that the actions he took in 2007 were agreed by the government and cabinet. But his arguments were turned down by the courts and he was accused of acting illegally.
According to the Pakistani constitution, anyone convicted of high treason could face the death penalty. Gen Musharraf travelled to Dubai in 2016 after a travel ban was lifted and he has refused to appear before the court, despite multiple orders.
The three-member bench had reserved its verdict in the long-running case last month, but was stopped from announcing it by a petition filed by the federal government to the Islamabad High Court.
Why is it significant?
The indictment of Gen Musharraf in 2014 for treason was a highly significant moment in a country where the military has held sway for much of its independent history.
Many of Pakistan's army chiefs have either ruled the country directly after coups, as Gen Musharraf did, or wielded significant influence over policymaking during periods of civilian rule.
But Gen Musharraf was the first army chief to be charged with such a crime and the powerful military have watched the case carefully.
It said the court ruling had been "received with a lot of pain and anguish by rank and file of the Pakistan Armed Forces".
"An ex-Army Chief, Chairman Joint Chief of Staff Committee and President of Pakistan, who has served the country for over 40 years, fought wars for the defence of the country can surely never be a traitor," a statement said.
Analysts say the institution is deeply aware that how the case proceeds could set a precedent.
Many expect the judgement to be delayed by an appeal by Gen Musharraf's lawyers and it unclear if a request to have him returned would be successful as there is no formal extradition treaty between Pakistan and the UAE, the BBC's M Ilyas Khan reports.
Who is Gen Musharraf?
He was appointed to lead the Pakistani army in 1998.
The army's involvement in the Kargil conflict in May 1999 caused a major rift between him and then-Prime Minister Nawaz Sharif, and the army general seized power in a coup in 1999.
At a glance
1943Born in Delhi, India
1961Joins Pakistan Military Academy
1999Leads bloodless coup and becomes president two years later
2008Goes into self-imposed exile - returns from 2013 to 2016
2014Charged with high treason
Serving as president until 2008, Gen Musharraf survived numerous assassination attempts and plots against him during his time in power.
He is best known internationally for his role in the US "war on terror", which he supported after the 9/11 attacks despite domestic opposition.
Gen Musharraf left the country after relinquishing the presidency in 2008, but returned in 2013 to contest the general elections, when he was barred from standing by the courts and was embroiled in several cases - including over the assassination of former PM Benazir Bhutto.
He appeared only twice in hearings for treason and earlier spent time at an army health facility or on his farm in Islamabad. He subsequently moved to Karachi in April 2014, where he lived until his departure two years later.