The Texas House voted early Thursday to approve a ban on “sanctuary cities,” after 16 hours of emotional debate.

The bill was approved with a final vote of 94-53 Thursday afternoon.

Senate Bill 4, which was passed by the Texas Senate in February, would require all law enforcement honor Immigration and Customs Enforcement (ICE) detainers. The House’s version of the bill was different from the version proposed by Sen. Charles Perry (R-Lubbock), in that it only allowed officers to ask someone about their immigration status if they are arrested.

One of the 145 amendments filed for the bill changed it to be like the Senate version, allowing officers to ask about a person’s immigration status if they’re detained. This includes when a person is stopped for jaywalking or for a traffic violation.

Critics say the amendment will lead to racial profiling. During the Wednesday debate, members made impassioned pleas for their colleagues to vote against the amendment, saying it will cause fear in immigrant communities.

"We aren't exaggerating when we say that the people who will be empowered by this amendment will be the criminals,” said Rep. Mary Gonzalez (D-Clint). “We're not exaggerating -- thanks everyone -- when we say the people who will feel the biggest effects of this are the most vulnerable, the women, the children, the survivors of sexual assault, rape, human traffickers, the people who will feel the disconnect from law enforcement, the people who are supposed to make them safe.”

Representative Roberto Alonzo (D-Dallas) tried to pass an amendment to stop the bill from going into effect until the Supreme Court rules on it. Several organizations and representatives have said there will be lawsuits filed against the state if the bill becomes law. That amendment failed.

So lawmakers tried to appeal to their colleagues emotions.

"It's been very hard for me to look at any of you because I'm filled with a lot of sadness and, I want to be candid with you, a lot of anger," said Representative Rafael Anchia (D-Dallas).

"The message that we are sending from this body, and we are sending it loud and clear today, is that 'once your work is done, you and your families had better stay in the shadows. And don't forget this. We the powerful are telling you we will pick you up. We value your work during the day but at night you better be scared because we will pick you up,'" he added.

"The people who will be the most impacted, the people who I feel I have to speak for today, are the women and the children who are the most vulnerable," said Representative Mary Gonzalez (D-Clint). "The women who are survivors of sexual assault and rape and human trafficking who will feel they cannot talk to law enforcement because we have now put in a 'show me your papers' amendment, that they will feel less safe."

"To, not only my colleagues, but all the people back home, we may have lost the battle, but we have not lost the war," said Representative Eddie Lucio, III (D-Brownsville).

Interim Austin Police Chief Brian Manley expressed the same sentiments about asking detainees their immigration status at a press conference after the bill received its final approval from the House.

"It is not something that I support or I think adds value to the community or makes the community anymore safe," Manley said. "Because regardless of how that individual we have stopped answers the question, it does not afford our officers any additional authority to take... All it could do is create a wedge between police departments and their communities if it is seen that we are an arm of immigration enforcement."

Despite pleas, the amendment was approved by a 81-64 vote. Democrats tried to lessen the effects of the bill until 3 a.m. Thursday. Following the amendment's passage, Democrats lumped all their remaining amendments together and record them as failed.

The Associated Press reported the ban also adds a jail penalty for police chiefs and sheriffs who refuse to comply with the ban. A final vote is needed on the bill before it can fully advance. Following that vote, the bill will go to a conference committee where members of the Senate and House will work out the other differences between.

Chief Manley said if the language of the bill does not change and it becomes law as is, Austin police will uphold the law.

"If this bill passes... we will review the bill. We will review the specific language. We will work with our legal advisors to determine if we need to change any policies here in the police department," he said.

Travis County Sheriff Sally Hernandez issued the following statement Thursday morning:

"I’m very proud of our Democrat delegation. They truly listened to leaders in both law enforcement and communities of faith, as well as the people we are sworn to protect and serve. They presented factual, common sense truths rather than fear based, misleading rhetoric. They recognized the cost of forcing local law enforcement to do the job of the federal government and the liability it places upon us.

"These men and women inspire me and I have great respect for the valiant fight they continue to wage for the sake of public safety in our great state."

Because there are differences between the House and Senate versions of SB4, the bill will head to a conference committee where lawmakers will hash out the differences before sending the bill to he governor to sign.

The Associated Press contributed to this report.