Congressional Black Caucus Chairwoman Joyce Beatty was arrested on Capitol Hill Thursday along with eight campaigners demonstrating for the right to vote.

“You can arrest me. You can not stop me. You can’t shut me up, ”wrote Ms. Beatty, an Ohio Democrat, in a tweet after she was arrested by the US Capitol Police in the atrium of a Senate office building. A reporter at the scene noted on Twitter that her hands had been zipped up before she was taken away.

The Capitol Police said in a statement the protesters violated a Washington law against overcrowding or blocking streets or certain spaces in public buildings. The demonstrators had been warned of their arrest, the police said.

Ms. Beatty and a group of activists protested in Congress against the disappearance of the John Lewis Voting Rights Act and For the People Act. The two bills aim in part to protect and expand access to voting, but both face great opportunities to become law.

Democrats, who have narrow majorities in Congress and need Republican votes to overcome a filibuster in the Senate, have for months expressed frustration at their inability to pass their major voting revisions as Republican parliaments rush to pass laws that restrict voting rights across the country.

President Biden this week called the fight against restrictive electoral laws the “most significant test of our democracy since the civil war,” despite seemingly having to acknowledge that the law had little hope of getting through.

In a statement made after her arrest, Ms. Beatty remained defiant.

“I stand in solidarity with black women and allies across the country in defense of our constitutional franchise,” she said. “We have come too far and fought too hard to see everything being systematically dismantled and restricted by those who want to silence us.”