CAIRO (AP) — In an unprecedented move, an Egyptian judge ordered prosecutors Wednesday to investigate three activist lawyers over his claims they "rioted" in court when they demanded to see their hunger-striking client.

Judge Mohammed Nagui Shehata ordered the investigation following a brief session and adjourned the session to Sept. 17. Shehata is the same judge who recently sentenced three Al-Jazeera English journalists to prison on terrorism related charges.

Lawyer Osama el-Mahdi, one of the three attorneys, said the defense team was only doing its job, demanding to see their client Ahmed Douma, who is serving a three-year prison sentence for protesting and is facing another trial.

Douma is one of over a dozen jailed activists who are on hunger strike to protest the government's crackdown on dissent. Douma started a hunger strike last week to protest his incarceration and his trial and his wife says his health is failing. Before his hunger strike, Douma was already suffering from gastrointestinal problems.

Relations between Shehata and lawyers already are tense. The judge, who often appears in court in sunglasses, previously screamed at one defendant in another court case to "shut up," prompting his lawyers to walk out of the courtroom.

El-Mahdi said despite Douma's poor health, he was carried into court on a chair for the hearing because he could not walk. Shehata refused a request from the lawyers for them to meet with Douma before the hearing. Douma was kept in a brown-tinted glass cage during the hearing, where the lawyers couldn't see or talk to him.

El-Mahdi, who had been standing when the judge entered the courtroom, got into an argument with Shehata over him standing up. The judge berated the lawyers for standing, and accused them of violating court procedures and causing riots in the room, el-Mahdi said, referring them to prosecutors to be investigated.

El-Mahdi said he had walked out before the order to protest the judge refusing to let him meet his client.

Mahmoud Belal, another of the three lawyers, said they were respectful when addressing the judge. Belal said it is not clear what will happen with the investigation.

"We have never studied this in law school," he said.

Prosecutors will investigate the lawyers and ultimately will decide whether to press formal charges against them. Veteran rights lawyer Taher Abul-Nasr said the judge acted within the law, accusing the lawyers of violating court procedures— a misdemeanor — "but I have never seen this implemented before, except in the movies: a lawyer on the job becomes a defendant."

Egypt's courts are swamped with the trials of thousands of protesters and government opponents following three years of turmoil and an intensified crackdown on dissent following the ouster of Islamist President Mohammed Morsi.

There has been an international outcry at speedy death sentences issued in mass trials, as well as heavy sentences levied against journalists. Egypt's government denies the judiciary is politicized, insisting that defendants receive fair trials.

Douma was a prominent opponent of longtime autocrat Hosni Mubarak, as well as Morsi. He was sentenced to three years for protesting against the military-backed government following Morsi's ouster last summer. He is facing a trial also from protests following the ouster of Mubarak.

There was no immediate comment from the court or the judge— who never addresses journalists.