Texas State Rep. Gene Wu was visibly emotional on Wednesday as he spoke about a controversial immigration enforcement bill before the Texas House of Representatives.

"This topic is painful for me," said Wu, a Democrat who represents a district in Houston. "I am an immigrant. My parents are immigrants. I represent a district filled with immigrants."

He spoke about the Chinese Exclusion Act of 1882, which restricted the immigration of Chinese immigrants into the United States. And he called attention to the incarceration of Japanese Americans during World War II.

Wu was speaking about Senate Bill 4, or SB4, which would allow law enforcement officials to ask about a detainee’s immigration status. Police chiefs and sheriffs could face criminal charges if they don't help the federal government enforce immigration laws.

After 16 hours of debate, the bill passed at 3 a.m. on Thursday. It still faces several hurdles before it becomes law.

"[The bill] will tell people, 'If you stop for the police, they will ask you about immigration status, even if you're trying to help, and you will be deported,'" Wu says.

SB4 stirred a lot of emotion in Texas. Other representatives spoke out against the bill during Wednesday's hearing. Rep. Mary Gonzalez talked about being a sexual assault survivor. Rep. Ana Hernandez told the story of her life before she became a US citizen. Rep. Victoria Neave was on the fourth day of a hunger strike against the bill when the hearing began. Protesters gathered outside the Capitol and a Facebook page was set up in support of Neave's action.

Wu says he chose to speak about Chinese exclusion and Japanese incarceration because, just like today, "the people who voted for that, the people who supported that, thought they were doing the right thing."

More about the Chinese Exclusion Act: Long before anxiety about Muslims, Americans feared the 'yellow peril' of Chinese immigration

More about World War II incarceration: New immigration policies are convincing more Japanese Americans to engage in the radical act of remembering

He believes the anti-immigration sentiments that exist in the US are part of a broader global trend.

"I think a lot of people see their problems in life and they want someone to blame and immigrants are always a convenient punching bag," he explains.

But he cautions about how bills like SB4 will be viewed in the future.

He warns that Texas lawmakers might one day regret supporting the bill and Texans will question why it was ever passed.

“Many members on the floor came up and told me, ‘We know this is wrong... but we’re going to do it anyway. Because we need to stay elected.'”

Also: Why one group of Chinese Americans opposes 'sanctuary' cities