More than 30 activists have been arrested for refusing to leave the Virginia Capitol steps during a protest of anti-abortion legislation.

Virginia Capitol Police Capt. Raymond Goodloe says 31 protesters were arrested Saturday. The demonstrators were some of an estimated 500 people who had gathered to protest legislation like a bill that passed the General Assembly earlier in the week that requires an ultrasound before an abortion.

The group had a permit to rally at the Bell Tower on Capitol Square, but Goodloe said rallies are not allowed on the Capitol steps.

The Richmond Times-Dispatch reports that police with plastic shields held demonstrators at bay while armed officers arrested protesters, who sat on the steps with locked arms.