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 Khan's Pakistan Tehreek-e-Insaf (PTI) party -- was also sentenced to 10 years in prison by the special court. 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 Khan'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. The case has been heard over the last few months inside a special court set up within the jail where Khan has been held since August. International media were not allowed to attend. Local media reported that the judge had recently been told to expedite the trial. Khan's PTI party said it would challenge the court ruling and called it a mockery. The general election will be held on 8 February, amid allegations that the PTI is being prevented by the authorities from campaigning. Khan is fighting scores of other legal cases. — BBC