Former Pakistani prime minister Imran Khan has been sentenced to 10 years in jail in a case in which he was accused of leaking state secrets.
Khan, who was ousted by his opponents as PM in 2022, is already serving a three-year jail term after being convicted of corruption.
He has called all the charges against him politically motivated.
The conviction under the secrets act comes the week before general elections in which is he barred from standing.
Former foreign minister Shah Mahmood Qureshi - vice-chairman of Imran Khan's Pakistan Tehreek-e-Insaf (PTI) party - was also sentenced to 10 years in prison by the special court set up inside Adiala Jail in Rawalpindi, where both men are being held.
The so-called cipher case revolves around the alleged leaking of secret diplomatic correspondence sent by Pakistan's ambassador in Washington to Islamabad when Khan was prime minister.
It relates to his appearance at a rally in March 2022, a month before the former cricketer was ousted from power in a vote of no confidence. Imran Khan appeared on stage, waving a piece of paper that he says showed a foreign conspiracy against him.
He said it detailed that "all will be forgiven if Imran Khan is removed from power". He didn't name the country - but was subsequently highly critical of the United States.
The prosecution said that the former PM's actions amounted to leaking a classified document and damaging diplomatic relations. The latter charge can lead to life imprisonment or even the death penalty.
Imran Khan has been held in Adiala jail since August. International media were not allowed to attend proceedings in the special court which have been going on over the last few months.
Local media reported that the judge had recently been told to expedite the trial.
A PTI spokesman said it would challenge the court ruling and called it a mockery.
"We don't accept this illegal decision," Naeem Panjutha, a lawyer for the former PM who is fighting scores of other legal cases, posted on X (formerly Twitter).
The general election will be held on 8 February, amid allegations that the PTI is being prevented by the authorities from campaigning.