The former presidential aspirants Beto O’Rourke and Julián Castro spoke to a crowd demonstrating outside the State Capitol.

AUSTIN, Texas — A day after the Texas House of Representatives voted to make it harder to cast a ballot in a state that already has some of the nation’s most restrictive voting laws, leading Democrats and hundreds of supporters gathered outside the State Capitol on Saturday to protest against legislation steaming toward approval in the Republican-led Legislature.

“This is the single greatest attack on our democracy, not just in our lifetime, but perhaps in the lifetime of this very democracy,” said former Representative Beto O’Rourke, who was a Democratic presidential candidate in the 2020 presidential primary.

He was joined by a second former Democratic presidential aspirant, Julián Castro, the former San Antonio mayor.

Saturday’s rally came a day after the State House of Representatives had voted, 78 to 64, to pass Senate Bill 7, which opponents continued to attack as an assault on voting rights despite a number of modifications added by Democrats. The bill now heads back to the State Senate, where representatives from the two chambers will meet in a conference committee to resolve differences between the two versions in the final three weeks of the session.

Mr. O’Rourke, citing what he described as “a moment of despair,” reminded the crowd that the Texas bills are among more than 360 Republican-backed measures that are being considered or have been enacted in legislatures across the country that would limit the right to vote.

Mr. Castro, who was secretary of Housing and Urban Development in the Obama administration, said the voting measures underscored a Republican motto: “If you can’t beat ’em, cheat ’em.”

“We’re here today to say no,” added Mr. Castro. “We will not stand for that.”

Mr. O’Rourke and Mr. Castro were the headliners among nearly a dozen speakers who appeared before up to 500 spectators in what was described as the largest gathering outside the State Capitol during this year’s legislative session.

Owen Shroyer, representing the conservative website Infowars, prominently inserted himself at the front of the crowd, clutching a microphone and frequently shouting disruptive comments at the speakers.

The former presidential candidate Julián Castro spoke at the rally on Saturday.
Mikala Compton/Reuters

The voting issue has become one of the most contentious elements in a session featuring a number of other hot-button issues including further restrictions on abortion, allowing the unlicensed carrying of guns and curtailing of transgender people’s rights. Gov. Greg Abbott has described the voter bills as “emergency” legislation needed to ensure integrity in the election system and combat voter fraud, although he and other Republicans have acknowledged that there has been minimal evidence of fraud in recent Texas elections.

Critics have assailed the voter measures as comparable to the abuses of Jim Crow, an era in which the white political power structure in Texas and other Southern states used tactics such as the now-unconstitutional poll tax and literacy tests to perpetuate segregation and suppress minority voters.

House members passed Senate Bill 7 at 3 a.m. on Friday, sending it back to the Senate to resolve differences between the two chambers before the May 31 adjournment. Before the final vote on Friday, House Republican leaders accepted a number of amendments, such as reduction of criminal penalties proposed under an earlier version of the bill for various infractions committed by election officials, including unauthorized removal of a poll watcher.

During legislative discussion, State Representative Rafael Anchía, a Democrat, questioned State Representative Briscoe Cain, the Republican chair of the House Elections Committee, on the use of the phrase “purity of the ballot box” in the legislation. The phrase was used in the Texas Constitution and during the Jim Crow era as the basis for excluding Black residents from all-white primaries. The phrase was from removed from the bill.

Democrats said the bill still contains unacceptable provisions that could hinder voting among minorities, older people and urban residents trying to avoid long lines to vote. One provision prohibits counties from distributing unrequested mail-in ballots to voters, which would bar a repeat of a Harris County initiative that drew fierce opposition from Republican officials.

The Texas business community, which initially remained largely silent, has also intensified its opposition, with more 200 businesses warning that the measures could restrict voter access and undercut the Texas economy. American Airlines and Dell Technologies, the first to oppose the bills, have since been joined by other companies including Microsoft, Hewlett-Packard, Etsy, Patagonia, Warby Parker and Gearbox.

A recurring theme throughout the hour-and-a-half-long rally was that the fight was not over even though the session was nearing adjournment and Republicans held the upper hand. Representative Chris Turner, the Democratic leader in the House, said Republicans could count on legal action if Democrats were unable to block the bills in the Legislature.

“We’ll see them in court,” he said.