NAIROBI, Kenya (AP) — A Kenyan judge has rescinded the orders used to deport to Canada an opposition politician over his alleged role in a mock inauguration by opposition leader Raila Odinga, while the government said it would appeal.

Judge Luka Kimaru also ordered the government to return the Kenyan passport confiscated from Miguna when he was deported.

Miguna was at Odinga's side when he took an oath as the "people's president" last month in a protest against President Uhuru Kenyatta's re-election.

The government considered the event treason and responded by outlawing the opposition National Resistance Movement as criminal organization, arresting opposition politicians and shutting down TV stations broadcasting the event for several days.

The actions led many Kenyans to worry whether one of Africa's most stable democracies was slipping into dictatorship.

Interior Ministry Principal Secretary Karanja Kibicho said Thursday it was not in the country's best interest for the passport to be returned to Miguna, the self-declared general of the National Resistance Movement.

Meanwhile, lawyers held a peaceful demonstration near the Supreme Court over Miguna's treatment, saying that instead of producing him in court the police handed him over to immigration authorities.

The opposition under Odinga continues to claim that results in last year's August election were manipulated in Kenyatta's favor. Odinga boycotted a fresh vote in October after the Supreme Court nullified the first one, saying electoral reforms had not been made.

Human rights organizations and the opposition have accused Kenyatta's government of attacking independent and watchdog institutions including the judiciary and media.

Kenyatta's party this week wrote to the Supreme Court's chief justice accusing the judiciary of bias, saying David Maraga "almost succeeded in burning the country."