AUSTIN, Texas (AP) — Texas police would have broader powers to ask people they detain about their citizenship status under a bill approved by Senate Republicans early Wednesday morning over the angry and tearful objections of Democrats who call it an open invitation to harass Latinos.

The 19-12 vote along party lines just after midnight and after nearly eight hours of debate sent the bill to the House, where a large Republican majority is also expected to approve it.

Many Texas law enforcement agencies discourage their officers from asking people they detain in everything from routine traffic stops to serious criminal investigations whether they are in the country legally. The measure pushed by Republican Gov. Rick Perry and legislative Republicans bans agencies and local governments from adopting such policies for their officers and deputies. Agencies that do would be cut off from state grants.

Senate Republicans were determined to give powers to individual police officers that many in law enforcement have said they don't want or need.

Critics, including law enforcement chief in Austin, El Paso, Fort Worth, Houston and San Antonio, worry the so-called sanctuary cities bill will be used by rogue officers to harass Latinos and lead to mistrust of police in immigrant communities.

Sen. Tommy Williams, R-The Woodlands, said police take an oath to uphold state and federal law and should be free to ask about detainees' immigration status because they could catch criminals or terrorists who have slipped into the country.

The bill is "not about race or fear-mongering," Williams insisted.

But Senate Democrats railed that white suspects will never be challenged on their citizenship and that Hispanics who are U.S. citizens will be harassed.

"When you tear apart families in my community, I will not be forgiving," said Sen. Leticia Van de Putte, D-San Antonio.

At one point, the Senate's seven Hispanic members all stood as symbols of who may be asked to prove they are citizens. At the same time, a man in the Senate gallery unfurled a sign that read "SHAME" before he was apprehended by security and removed.

"This bill strikes at the hearts and souls of the Latino people of Texas," said Sen. Carlos Uresti, D-San Antonio. "Any furtive glance or misstatement can put you under suspicion. All that matters is the color of your skin and if you have an accent. I shouldn't have to prove I'm a citizen."

Democrats blocked the bill during the regular session, but Perry, who is considering seeking the GOP nomination for president, added immigration enforcement issues to the call of the special session. Voting rules that helped Democrats block the bill last month don't apply in the special session.

A House vote sending the bill to Perry to sign into law could come later this week.

Perry has said federal immigration enforcement has failed and that Texas must protect its own borders. Supporters of the bill also note several cases of crimes, including murders and drunken-driving fatalities, committed by illegal immigrants.

"There are crimes being committed right now by people who are in this country illegally," Williams said.

An estimated 1.6 million illegal immigrants are in Texas, according to the Pew Hispanic Center in Washington.

Democrats complained the term "detention" is too vague and could lead to immigration inquiries even in cases as simple as violating restrictions on watering lawns or a traffic stop for faulty brake lights. They argued the bill does nothing to prevent illegal immigration.

Democrats won a minor victory with an amendment that prohibits police from pulling someone over or searching a business solely to enforce federal immigration law.

Opponents said the bill does nothing to prevent illegal immigration and argued that crime victims fearing interrogations about their immigration status won't report domestic violence or activity by drug cartels.

"Immigrant communities will be driven further into the shadows," said Sen. Jose Rodriguez, D-El Paso.

The bill also requires every person's name to be checked in federal immigration databases through a program called Secure Communities, and gives the Texas Department of Public Safety the authority to make sure someone is in the country legally before issuing a driver's license.

"Drug traffickers and transnational gangs should think twice before they step foot in Texas," said Republican Lt. Gov. David Dewhurst.