Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Beto O'Rourke said he would take down existing walls and fencing at the U.S.-Mexico border if he could.

O'Rourke, a former congressman for El Paso who ran a high-profile challenge against GOP Sen. Ted Cruz of Texas, said in an interview with MSNBC's Chris Hayes on Thursday, "Absolutely, I'd take the wall down."

His comment came in response to a question posed on Twitter by Rep. Dan Crenshaw, R-Texas. "If you could snap your fingers and make El Paso’s border wall disappear, would you?"

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Crenshaw said in his post that fencing and other border barriers have caused illegal crossings to drop significantly.

But O'Rourke told Hayes the barriers don't bring Americans greater security.

"Here’s what we know: after the Secure Fence Act, we have built 600 miles of wall and fencing on a 2,000 mile border," O'Rourke said. "What that has done is not in any demonstrable way made us safer."

Beto O’Rourke tells @chrislhayes he would take down existing barriers at the U.S.-Mexico border if he could, in response to a question posed on Twitter by Rep. Dan Crenshaw.https://t.co/m6nkLQ25rm — MSNBC (@MSNBC) February 15, 2019

O'Rourke said fencing has forced migrants to the most inhospitable areas of the southern border, "ensuring their suffering and death.” More than 4,000 migrants have died as a result, O'Rourke said.

"They’re dead, over the last 10 years, as we have walled off their opportunity to legally petition for asylum to cross in urban centers, like El Paso," O'Rourke said. "To be with family. To work jobs. To do what any human being should have a right to be able to do."

President Donald Trump was in El Paso Monday night to rally public support for his proposed border wall. O'Rourke held a rally at the same time less than a half mile away, where he challenged Trump's message.

Congress passed a government spending deal Thursday that would provide further funding for border security but not for Trump's wall. The bill was negotiated by a bipartisan group of congressional leaders and passed a day before the deadline of Friday night to prevent another partial government shutdown.

The White House said Thursday that Trump would sign the spending measure but also planned to declare a national emergency "to ensure we stop the national security and humanitarian crisis at the border."