AUSTIN, Texas — Despite barely beating a midnight deadline, hundreds of jeering protesters helped stop Texas lawmakers from passing one of the toughest abortion measures in the country.

As the protesters raised the noise to deafening levels in the Texas Senate chamber late Tuesday, Republicans scrambled to gather their colleagues at the podium for a stroke-of-midnight vote.

“Get them out!” Sen. Donna Campbell shouted to a security guard, pointing to the thundering crowd in the gallery overhead that had already been screaming for more than 10 minutes.

“Time is running out,” Campbell pleaded. “I want them out of here!”

It didn’t work. The noise never stopped and despite barely beating the midnight end-of-session deadline with a vote to pass the bill, Lt. Gov. David Dewhurst said the chaos in the chamber prevented him from formally signing it before the deadline passed, effectively killing it.

Dewhurst denounced the protesters as an “unruly mob.” Democrats who urged them on called the outburst democracy in action.

In either point of view, a raucous crowd of chanting, singing, shouting demonstrators effectively took over the Texas Capitol and blocked a bill that abortion rights groups warned would close most abortion clinics in the state.

“They were asking for their voices to be heard,” said Sen. Wendy Davis of Fort Worth, who spent nearly 11 hours trying to filibuster the bill before the outburst. “The results speak for themselves.”

The final outcome took several hours to sort out.

Initially, Republicans insisted the vote started before the midnight deadline and passed the bill that Democrats spent the day trying to kill. But after official computer records and printouts of the voting record showed the vote took place Wednesday, and then were changed to read Tuesday, senators retreated into a private meeting to reach a conclusion.

At 3 a.m., Dewhurst emerged from the meeting still insisting the 19-10 vote was in time, but said, “with all the ruckus and noise going on, I couldn’t sign the bill” and declared it dead.

He denounced the more than 400 protesters who staged what they called “a people’s filibuster” from 11:45 p.m. to well past midnight. He denied mishandling the debate.

“I didn’t lose control (of the chamber). We had an unruly mob,” Dewhurst said. He even hinted that Gov. Rick Perry may immediately call another 30-day special session, adding: “It’s over. It’s been fun. But see you soon.”

Many of the protesters had flocked to the normally quiet Capitol to support Davis, who gained national attention and a mention from President Barack Obama’s campaign Twitter account. Her Twitter following went from 1,200 in the morning to more than 20,000 by Tuesday night.

“My back hurts. I don’t have a lot of words left,” Davis said when it was over and she was showered with cheers by activists who stayed at the Capitol to see her. “It shows the determination and spirit of Texas women.”

Davis’ mission was cut short but her effort ultimately helped Democrats earn a rare victory in a Legislature dominated by Republicans for more than a decade.

“It’s a bad bill,” said Sen. Kirk Watson of Austin, leader of the Senate Democrats.

The bill would ban abortion after 20 weeks of pregnancy and force many clinics that perform the procedure to upgrade their facilities and be classified as ambulatory surgical centers. Also, doctors would be required to have admitting privileges at a hospital within 30 miles — a tall order in rural communities.

If signed into law, the measures would have closed almost every abortion clinic in Texas, a state 773 miles wide and 790 miles long with 26 million people. A woman living along the Mexico border or in West Texas would have to drive hundreds of miles to obtain an abortion if the law passed. The law’s provision that abortions be performed at surgical centers means only five of Texas’ 42 abortion clinics are currently designated to remain in operation.

Republicans and anti-abortion groups insisted their goal was to improve women’s health care, but also acknowledged wanting clinics to close.

“If this passes, abortion would be virtually banned in the state of Texas, and many women could be forced to resort to dangerous and unsafe measures,” said Cecile Richards, president of Planned Parenthood Action Fund and daughter of the late former Texas governor Ann Richards.

The showdown came after Davis had slogged her way through about 11 hours of speaking while Senate Republicans — and several House members — watched and listened for any slipup that would allow them to end the filibuster and call a vote.

Democrats chose Davis, of Fort Worth, to lead the effort because of her background; she had her first child as a teenager and went on to graduate from Harvard Law School.

Rules stipulated she remain standing, not lean on her desk or take any breaks — even for meals or to use the bathroom. But she also was required to stay on topic, and Republicans pointed out a mistake and later protested again when another lawmaker helped her with a back brace.

Lawmakers can vote to end a filibuster after three sustained points of order. As tension mounted over Davis’ speech and the dwindling clock, Campbell, a first-term lawmaker from New Braunfels, made the call on the third violation, sparking nearly two hours of debate on how to handle it.

After much back and forth and senators shouting over each other, the Republican majority forced a vote to end the filibuster minutes before midnight, sparking the raucous response from protesters.

Senate security and several Department of Public Safety state troopers tried to quiet the crowd but were simply outnumbered and had no hope of stopping the outburst.

Sen. Dan Patrick, R-Houston, blamed the confusion surrounding the final vote on the demonstrators and Democratic senators who urged them on.

“Had that not happened, everyone would have known,” what was happening, Patrick said.

Standing next to him was Sen. Juan “Chuy” Hinojosa, a Democrat.

“This is democracy,” Hinojosa said. “They have a right to speak.”

——

Senate Bill 5: http://www.legis.state.tx.us/BillLookup/history.aspx?LegSess

831&Bill

SB5

——

Follow Jim Vertuno on Twitter: http://twitter.com/JimVertuno .

Follow Chris Tomlinson on Twitter: http://twitter.com/cltomlinson