AUSTIN, Texas – A Texas version of a North Carolina-style “bathroom bill” targeting transgender people again passed the state Senate on Tuesday over opposition from police and major corporations, but still faces an uncertain path to becoming law.

It is the second time this year Texas has lurched toward putting restrictions on which bathrooms transgender people can use, but the same deep GOP divisions that sank the first try remain.

If anything, tensions are running even hotter. Now at stake for Republican Gov. Greg Abbott, who faces re-election in 2018 and has gone against the tide of GOP governors who have shied from following the lead of North Carolina, is whether his party will deliver after ordering them to finish the job in a special legislative session that ends in August.

Big business and police -two usually important groups to Texas Republicans – have urged Abbott to drop it. Just as the bill came to floor inside the Senate, police chiefs and commanders from Texas’ largest cities stood outside on the Capitol steps and railed against the effort as a waste of time.

Story continues below advertisement

READ MORE: Deal reached to end North Carolina transgender bathroom bill

Nearly 9 hours later, the bill tentatively passed 21-10 after Democrats dragged out the vote. State troopers removed a few protesters in the mostly empty Senate gallery who shouted “This is a farce!” and unfurled a banner that read “Y’all means all.”

“It’s about privacy and protection,” Republican state Sen. Lois Kolkhorst said. She said her bill would stop a man from “saying today I feel like a female and I have the right to go into these intimate spaces.” Tweet This

The bill would require transgender people to use the bathroom that matches the sex on their birth certificate, including in public schools. It now moves to the House, where the original Senate version died earlier this year without a vote.

WATCH: 17-year-old transgender boy wins Texas girls wrestling title

0:38 17-year-old transgender boy wins Texas girls wrestling title 17-year-old transgender boy wins Texas girls wrestling title

The bill has ripped clean open a rancorous split in the Texas GOP between moderates who stand with high-profile opponents – including Amazon and the NFL – and social conservatives who drive the state’s political agenda. Republican House Speaker Joe Straus has aligned with companies that denounce the measure as bad for Texas business and has not wavered in his opposition.

Story continues below advertisement

Before the vote, Abbott released a statement touting “growing support” and listed endorsements from five socially conservative groups.

Kolkhorst called the bill an “opportunity to shut down predators and voyeurs.” Police chiefs and top commanders from Texas’ four biggest cities – Houston, Dallas, San Antonio and Austin -said before the vote they had not found examples of restroom-related sexual assault and argued the bill would make Texas more, not less, dangerous.

“Folks will feel emboldened, they will feel that they can discriminate, they can target and they will feel they can have vigilante justice out there because of this law,” Houston police Chief Art Acevedo said. Tweet This

It’s not just police from Texas’ liberal big cities.

“I’ve never met an officer who was pushing for the bathroom bill,” said Charley Wilkison, executive director of the Combined Law Enforcement Association of Texas, an influential police lobby group. His group has not, however, officially taken a position.

On Monday, police in Austin filed court documents alleging that a Texas transgender activist beaten in a carjacking was targeted because of her gender identity. Two brothers were charged with beating and pulling a gun on Stephanie Martinez before stealing her car last week.

Court documents show that one of the suspects allegedly told police they targeted Martinez because she was transgender. The day after her attack, Martinez was among hundreds who packed the Capitol to testify against the bill.

Story continues below advertisement

The bill is the second time this year that police leaders from Texas’ biggest cities, which are also some of the largest in the U.S, are at odds with a marquee piece of Republican legislation. The same chiefs also unsuccessfully railed against a “sanctuary cities” ban signed by Abbott in May that lets police ask people during routine stops whether they’re in the U.S. legally.

North Carolina earlier this year partially repealed its “bathroom bill” following economic and political backlash. In Texas, Republican supporters have dismissed the impact on North Carolina as exaggerated.