MOSCOW — Under the Russian Constitution, Pavel V. Dmitrichenko, the star dancer charged with arranging an acid attack on the Bolshoi Ballet’s artistic director, is innocent until proven guilty. But in court, Mr. Dmitrichenko sits in a locked iron cage, guarded by security officers and, at times, a nasty-looking dog.

A similar scene played out this month in Cairo, where the ousted Egyptian president, Mohamed Morsi, was corralled with other defendants in a meshed metal cage — his first public appearance in four months. Mr. Morsi was defiant, refusing to wear the customary prison-issued white track suit, demanding a microphone to speak from the pen and denouncing the trial as illegitimate.

Long eschewed as prejudicial by American courts and by the International Criminal Court in The Hague, locked docks, either metal cells or enclosures made of glass or wood, are still common, not only in countries like Russia and Egypt where the judicial systems often face international criticism, but also in many Western democracies, including Britain and France.

Critics say that keeping defendants locked up in court presumes guilt, hinders the defense and often has no basis in law, resulting instead from administrative rules. In Russia, it is standard for anyone held without bail, even those who pose little security risk, like the women from the punk band Pussy Riot, who were convicted of hooliganism after protesting at a church last year.