Texas Rep. Beto O’Rourke is speaking out against violence against migrants at the U.S.-Mexico border, urging the White House to “follow our own laws” and give asylum seekers the opportunity to petition for sanctuary, not lock them in cages or tear-gas them.

“People are leaving violent countries where they fear for their lives. Without money, they are subsisting on hope for their kids, for themselves, that they can get to safety. After being denied the ability to lawfully petition for asylum for the last 10 days, they are desperate,” he wrote in a piece on Medium posted on Sunday. “We choose how to respond to this challenge.”

O’Rourke, who unsuccessfully challenged Sen. Ted Cruz (R) for his seat in this month’s midterm election, issued his rebuke the same day migrants were seen being tear-gassed by U.S. agents in Tijuana near a port of entry.

PAUL RATJE via Getty Images Rep. Beto O'Rourke (D-Texas) criticized tear-gassing migrants at the U.S.-Mexico border on Nov. 25 and urged more timely processing of asylum seekers' applications.

President Donald Trump on Monday accused “many” of the migrants approaching the border of being “stone cold criminals” and threatened to “close the Border permanently if need be.”

O’Rourke, recognizing hardships that have propelled many migrants to seek asylum, urged that the people be given the opportunity to plead their cases in a timely manner, as long as it is done so peacefully. But that’s just the short-term plan, he said.

“Longer term: work with the people of Guatemala, Honduras and El Salvador to address underlying conditions that are causing them to flee in the first place. That means addressing effects of our failed past involvement in those countries (in their civil wars, drug trade and drug wars) and the institutional failings in those countries (rule of law),” he stated. “It won’t be easy and will involve a much greater investment of time, focus and resources. Or we can continue to ignore those countries and their people until they show up at our border.”