A senior magistrate said courtrooms had “almost descended into the Wild West”.