Editor's note: This story has been updated throughout.

As the Trump administration moves to expedite construction of a physical barrier on the southern border, it will also begin building more detention space for undocumented immigrants in the area and work to withhold federal dollars from entities that don’t enforce immigration laws, the White House announced Wednesday.

“Building this barrier is more than just a campaign promise, it’s a common-sense first step to really securing our porous border,” White House press secretary Sean Spicer told reporters during a briefing. “And yes, one way or another — as the president has said  before —  Mexico will pay for it.”

On Wednesday, President Donald Trump signed the executive order to create the border wall and add the detention space after the swearing-in ceremony for Department of Homeland Security Secretary John Kelly.

The Texas Tribune thanks its sponsors. Become one.

In a speech to federal agents in Washington after signing the order, Trump said the measures would help restore peace and stability in the U.S. but would also benefit Mexico.

“This will also help Mexico by deterring illegal immigration from Central America and by disrupting violent cartel networks,” he said. “As I have said repeatedly to the country, we are going to get the bad ones out – the criminals and  the drug dealers and gang and gang members and cartel leaders.”

The executive order also calls for the hiring of another 5,000 Border Patrol officers and tripling the number of U.S. Immigration and Customs Enforcement officers currently employed by the federal government, he said.

The text of the order also gives a glimpse into how Trump expects Mexico to pay for the wall. It orders agency directors to “identify and quantify” the amount of aid the country has given to Mexico over the previous five years. Analysts have stated that one way to force Mexico to pay is to cut off foreign aid.

The 1,288 miles along the U.S.-Mexico border with no fence are outlined in purple.This map was created by Reveal from the Center for Investigative Reporting. Sources include: Reveal research, U.S. Customs and Border Protection, OpenStreetMap, Allison McCartney

The order seeks to boost local and state involvement in immigration enforcement by expanding the controversial 287(g) program, which allows local and state officers to enforce immigration laws if they undergo the requisite training.

“In furtherance of this policy, the Secretary shall immediately take appropriate action to engage with the Governors of the States, as well as local officials, for the purpose of preparing to enter into agreements under section 287(g)” the order says.

The Texas Tribune thanks its sponsors. Become one.

Reaction to the order was swift. The Mexican American Legal Defense and Educational Fund warned Wednesday that Trump's move will cause irreversible damage.

"Aggressive interior enforcement is an abject failure, delivering tremendous upheaval and harm to families, schools, and workplaces," MALDEF President and General Counsel Thomas A. Saenz said in a statement. "The economic disruption to critical industries, such as agriculture, from such efforts render these executive orders a direct and undiluted threat to United States national security."

The White House is also reverting to using the controversial Secure Communities program, which had been replaced by former President Obama with the Priority Enforcement Program.

“We’re going to create more detention space for illegal immigrants along the southern border to make it easier and cheaper to detain them and return them to their country of origin,” Spicer said at the White House briefing. “We’re going to end the last administration’s dangerous catch-and-release policy, which has led to the deaths of many Americans.”

Through the Secure Communities program, administered by U.S. Immigration and Customs Enforcement, local law enforcement compares the fingerprints of those arrested to a federal database to determine if the individual is eligible for deportation under current federal immigration laws. Federal funds will be withheld from cities and states that don’t comply with federal law, Spicer said.

“After these criminals spend time in prison for the crimes they have committed, they’re going to get one-way tickets to their country of origin,” he said.

In order to force those governments to take back the deportees, Spicer said the administration would consider withholding visas and “use other tools” to ensure compliance.

Border lawmakers and officials quickly criticized the idea that a wall was needed and instead advocated for a more modern solution,

The Texas Tribune thanks its sponsors. Become one.

During a visit to the state Capitol on Wednesday, Laredo Mayor Pete Saenz said he was disappointed that Trump would make the decision without reaching out to border leaders.

“It’s sad day In Laredo, Texas. And frankly on the entire border. We would hope maybe the people that surround President Trump would think differently. Maybe they can influence him still,” he said. “We respect him as our president, but we respectfully disagree with this notion of a wall. There is room for compromise — we’re not totally against any type of fencing if it’s strategically placed.”

State Rep. César Blanco, D-El Paso, said Trump had no choice but to please his out-of-touch supporters.

“We’ve seen that the border wall is very expensive to maintain. It’s politics as usual,” he said. “I think Trump has to fulfill his campaign promise to build a wall, and I think Republicans across the country are lining up behind him. It’d be smart for him to invest in technology for our bridges."

While few Texas Republicans had voiced full support for a wall during the campaign, they offered positive reviews Wednesday as word got out about Trump's order.

"Governor Abbott is pleased with the immediate action President Trump has taken to fulfill his promise to secure the border," Abbott spokeswoman Ciara Matthews said in a statement. "The Governor looks forward to working with the Trump Administration to keep Texans safe and protect our sovereignty."

Abbott has previously said it would be difficult to build a wall along some parts of the border, including stretches of the Rio Grande River and Big Bend National Park.

"I’m open to anything that works," Attorney General Ken Paxton told reporters in Austin, speaking before Trump issued the order. "If the wall is the best way to secure our border and make sure that our citizens are safe and secure, then I’m open to it."

U.S. Rep. Will Hurd, who represents hundreds of miles along the Texas-Mexico border, was the lone Texas Republican on Wednesday to react negatively to Trump's order. In a statement, he reiterated his longstanding view that a wall "is the most expensive and least effective way to secure the border."

Before Spicer’s briefing, Trump told ABC News that he’d find a way to compel Mexico to pay for the barrier.

“We are going to be starting those negotiations relatively soon,” he said. “Absolutely, 100 percent [they will pay us back].”

When asked about Mexican President Enrique Peña Nieto’s recent statement that his government will not pay for any part of the project, Trump said, “He has to say that.”

“I am just telling you there will be a payment. It will be in a form, perhaps a complicated form," he continued.  "You have to understand what I am doing is good for the United States. It’s also going to be good for Mexico.”

Patrick Svitek contributed to this report. 

Get The Brief

Never miss a moment in Texas politics with our daily newsletter.