ISLAMABAD — Pakistan’s former Prime Minister Nawaz Sharif on Tuesday criticized the country’s judiciary for rejecting his appeal over his disqualification from office and vowed again to fight a legal battle to clear his name.

In July, the Supreme Court barred him from office for concealing financial assets. Sharif has since been replaced by a member of his ruling party but has vowed to fight and prove he never indulged in corruption. Earlier this month, the top court rejected Sharif’s request for a review of its July 28 ruling.

Tuesday’s remarks by Sharif came just after he made his first appearance before an anti-corruption court to face corruption charges earlier in the day. He has returned home from London, where he travelled to see his ailing wife who is undergoing medical treatment in Britain.

“I know for what reasons I am being punished,” Sharif told a news conference, without elaborating.

Sharif is likely to be indicted on Oct. 2 in connection with three corruption cases that were filed against him by the country’s anti-corruption body earlier this month. Sharif resigned after the Supreme Court disqualified him, but afterward said he was being punished over a trivial charge.

As he appeared before the corruption court earlier on Tuesday, a group of Sharif’s followers gathered outside the court and later some chanted slogans in his support inside the courtroom.

That annoyed the judge, Mohammad Bashir, who then asked Pakistan’s three-time premier to leave the hearing as his lawyers were present and would be able to represent him.

Sharif left, along with his followers.

In an interview with The Associated Press on Monday, cricket legend and Pakistan’s top opposition leader, Imran Khan, said he believed Sharif has no future in the country’s politics.

Khan said he would not pardon any corrupt figures if his countrymen voted him to power in the 2018 elections.