Kenyan authorities have deported a senior opposition figure in the latest move of a wide-ranging crackdown on political opponents and an intensifying confrontation with the judiciary.

Miguna Miguna, who had been held in police custody in defiance of a court order demanding his release, was put on a flight to Canada via Europe at about 10pm on Tuesday.

“The illegitimate, despotic regime ... forcefully placed me on a late night KLM flight from Nairobi to Amsterdam in flagrant violation of my constitutional rights, five court orders and common decency,” Miguna said in a statement on Wednesday.

The lawyer was arrested last week in a dawn raid on his home in Nairobi after participating in a mock swearing-in ceremony for opposition leader Raila Odinga that was attended by thousands of people.

Government lawyers called the ceremony an act of treason. Three TV networks were closed down after broadcasting it, of which two have reopened. Fourteen opposition members have had their passports suspended.

Judges had ordered the authorities to free Miguna, but instead he was presented in court in a small town 60km (37 miles) from the capital on Tuesday, to be charged with “being present and consenting to the administration of an oath to commit a capital offence”.

Protesters run away after police fire teargas in Kisumu. Photograph: James Keyi/Reuters

The crackdown and confrontation with the judiciary comes three months after Uhuru Kenyatta won another five-year term as president in an election rerun triggered when the supreme court annulled the result of an August election because of irregularities.

Kenyatta won the rerun with 98% of the vote, but turnout was only 39% after the opposition boycotted the poll, saying it was neither free nor fair.

Odinga dismissed the October election as “fake” and the supreme court was again asked to dismiss the result, but it upheld Kenyatta’s victory.

The arrests and broadcast bans are a shock to Kenyans, who have grown used to a freewheeling media and irreverent political culture since decades of autocratic rule ended in 2002.

Odinga’s supporters protested on Tuesday, blocking roads and clashing with police in the western city of Kisumu.

A man was killed by a stray bullet after police fired into the air to disperse demonstrators in nearby Ahero, Miguna’s home town.

On Tuesday evening, the high court judge Luka Kimaru ordered all proceedings against Miguna to be stopped until police brought him to a Nairobi court, as previously ordered.

Kimaru had earlier ruled that senior police officers were guilty of disobeying court orders to release Miguna, and summoned them to appear before him.

Tom Kajwang and Miguna Miguna, right, at the mock ceremony for the opposition leader Odinga. Photograph: Ben Curtis/AP

Instead, Miguna was placed on a KLM flight departing Nairobi for Amsterdam, his lawyers said.

We are reliably informed that Miguna Miguna has been forced into a KLM flight for “deportation” to Canada. Now, how do you deport a Kenyan? This Country has been overrun by criminals. — Nelson Havi (@NelsonHavi) February 6, 2018

The authorities say Miguna failed to follow administrative procedures after gaining Canadian citizenship several years ago and was therefore no longer considered a Kenyan national.

This claim was contested by Miguna’s lawyers and supporters, who said he had been a candidate in multiple elections last year. Only Kenyan citizens can stand.

Overnight, an official government website said: “Miguna is headed home.”

Miguna told reporters at court that he had been held for five days without access to his family or a lawyer, in conditions “unfit for human existence”.

An editorial in the Nation, a Kenyan newspaper, said the authorities were sending the wrong signal by deciding “which laws and court orders to obey and which ones to ignore”.

“In a democracy, adherence to the rule of law and respect for institutions such as the judiciary are important glues that hold the country together,” it said.