Republican Gov. Greg Abbott of Texas used Facebook live to broadcast his signing of a bill targeting so-called sanctuary cities. Office of the Governor Greg Abbott/Facebook Republican Gov. Greg Abbott of Texas approved a measure targeting so-called sanctuary cities on Sunday, allowing law enforcement officers during a routine stop to question any person about his or her citizenship status and threatening local law-enforcement officials who do not comply with federal immigration requests.

Abbott signed the bill, known as SB4, on Facebook Live on Sunday evening without notice, sparking condemnation from civil-rights activists.

Critics called Abbott's Sunday-night signing a "cowardly" attempt to avoid protests, but the governor's office said it wanted to take advantage of social media, according to the Associated Press.

"Let's face it: The reason why so many people come to America is because we are a nation of laws, and Texas is doing its part to keep it that way," Abbott said in the Associated Press.

The controversial bill not only allows officers to question a people about their residency status but also allows police chiefs, sheriffs, constables, and jail administrators to be charged with a Class A misdemeanor if they refuse to comply with a federal detention request from the Immigration and Customs Enforcement agency. Punishment for violating the law may include fines or jail time.

Federal law does not require cities to abide by ICE's requests, allowing each official to exercise judgment in detaining a person unless the request was accompanied by a warrant signed by a judge.

Some law-enforcement officials fear that the new law will spread fear and consternation in their communities, and opponents to the law have vowed to fight it in court.

"Broad rules, such as those imposed by SB4, that push local law enforcement to take a more active role in immigration enforcement will further strain the relationship between local law enforcement and these diverse communities," police chiefs from several major Texas cities wrote in a letter last week.

"Such a divide between the local police and immigrant groups will result in increased crime against immigrants and in the broader community, create a class of silent victims, and eliminate the potential for assistance from immigrants in solving crimes or preventing crime."

The new law is scheduled to go into effect September 1.