An attempt to block a controversial abortion bill in the Texas state legislature ended in chaos after a day of high procedural drama, led by state senator Wendy Davis and fanned by nationwide support on social media, culminated in a hotly contested vote.

Republicans said the bill, which would severely restrict access to abortion in the state, passed the Republican-dominated legislature within a midnight deadline.

But reporters watching the vote were clear that it was not completed until after midnight. The Guardian, monitoring the debate on a live stream, judged a roll call was not finished until 12.01am local time at the earliest.

The Texas lieutenant governor eventually conceded defeat.

In all, Davis spoke for 10 hours and 45 minutes in an attempt to filibuster the bill. When procedural motions brought by Republican opponents forced her to stop speaking, other Democratic colleagues attempted to run down the clock.

During one procedural tussle, just after 11.45pm, Senator Leticia Van de Putte asked what a female member had to do to be heard over a male senator. The comment prompted the public gallery, which had been filling up during the evening, to erupt. The cheers delayed a final vote on the bill to the stroke of midnight.

This is outside the Texas senate right now #standwithwendy pic.twitter.com/xULpofHfwo — Commie-Chan (@CommieChan) June 26, 2013

To be successful in her filibuster Davis had intended to speak for 13 straight hours, without taking a bathroom break, sitting or even leaning against her desk, until midnight when the bill would expire. She refused to yield for questions.

As the speech progressed, interest intensified around the United States. The president, Barack Obama, tweeted his support, and the live stream of the proceedings on YouTube passed 100,000 viewers.

Something special is happening in Austin tonight: http://t.co/RpbnCbO6zw #StandWithWendy — Barack Obama (@BarackObama) June 26, 2013

The aim of the filibuster was to prevent the bill, authored by Republican senator Glen Hegar, reaching Texas governor Rick Perry. If it does the House must approve the bill on its third reading on Monday, according to the Texas Tribune. Democrats are outnumbered in both the House and the Senate.

The bill would ban abortions in the state after the 20-week gestation mark, limit abortion-inducing drugs and require abortions to be performed in ambulatory surgical centres.

Advocates say these and other restrictions in the bill would also cause the closure of 37 of Texas's 42 abortion clinics.

Davis opened her speech saying she wanted "to humbly give voice to thousands of Texans" and called Republican efforts to pass the bill a "raw abuse of power."

Wearing pink running shoes, Davis rocked from hip to hip and slowly paced while she read testimony from doctors and women who would be affected by the bill if it were passed.

"What purpose does this bill serve? And could it be, might it just be a desire to limit women's access to safe, healthy, legal, constitutionally-protected abortions in the state of Texas?"

As the hours have progressed Davis has filled in the hours by making her case against the bill, and reading from the testimony of women and doctors who would be affected by the passing of Bill 5.

Davis is a rising Democratic senator. The Associated Press reported that Democrats chose Davis to lead the charge against Bill 5 due to her background as a woman who had her first child at 19 and went on to graduate from Harvard Law School.

Her marathon speech, which began at 11.18am local time, came to an end at 10.03pm when the last of three points of order were sustained against her.

A rush of procedural motions and inquiries by Democrat senators delayed the final voteon the bill. Van de Putte asked for a summary of previous points of order, saying she had been away from the senate attending her father's funeral.

The leader of the Democrats in the senate, Kirk Watson, began what amounted to his own filibuster.

With less than 15 minutes to go until midnight Van de Putte asked what a female member of the senate had to do to be heard over her male colleagues. She believed she had raised a motion earlier but was not heard.

It was at this point the crowded public gallery began chanting and cheering. A vote was called on the SB5 bill but the noise was at such a level that voting was suspended until order was restored.

The gallery appeared to take this as an invitation to ramp up their noise for the remaining 15 minutes, with encouragement from Democrats on the floor. The session ended in chaos and confusion, and without the vote being completed by midnight.

There were reports some senators did not even know what they voted on.

Our reporter on the floor says some Republicans aren't sure whether they actually voted to pass #SB5 or on "previous question." #txlege — Aaron Franco (@AaronFrancoYNN) June 26, 2013

For over 30 minutes senators milled around the floor and protesters shouted from the gallery, before troopers moved in, arresting at least one protester.