Demonstrators prayed outside the court after the ruling.