Former Pakistani Prime Minister Imran Khan appeared before the Supreme Court of Islamabad, where he was charged with contempt of court and threats.

Legal experts said Khan, who is being charged for a second time, has limited options and could avoid conviction if he apologizes for his comments about Judge Ziba Chaudhry.

Khan was angered by Choudary, likely due to his decision to allow the police to question Shahbaz Gill, a close aide of Khan and chief of staff of his political party PTI, who was arrested this month for allegedly trying to incite soldiers to rebel against their military leadership and remains in custody pending trial.

Khan addressed Judge Chaudhry during one of the meetings with the words: “Get ready, we will take action against you.”

Khan has been holding mass rallies for early elections since he was ousted last April in a vote of no confidence in his government in parliament. However, a conviction on a new charge will not allow him to run for election, according to the country’s law.

Khan was summoned by the judiciary after the 1993 elections, calling the judiciary’s behavior “disgraceful” and stating that he did not guarantee free or fair elections, but the Supreme Court then pardoned him. Notably, Khan accused the Pakistani army of being part of an American plot to overthrow him, which was denied by Washington, the Pakistani army, and the government of Shahbaz Sharif.