The United States has the right to build as many walls as it wants, but that's not the right way to approach border security, former Mexican President Vicente Fox told CNBC on Wednesday.
"Walls historically have never worked — the Chinese wall, the Berlin wall," he said in an interview with "Closing Bell."
"There are many more intelligent ways of bringing order to the border, of bringing security to the border," added Fox, who has been one of President Donald Trump's frequent critics.
Trump has insisted he wants a wall on the U.S.-Mexican border to stop illegal immigration.
However, on Tuesday Senate Democratic leader Chuck Schumer said a wall was "off the table." Lawmakers are trying to work out a deal to protect young undocumented immigrants, known as "dreamers."
Trump responded on Twitter late Friday night, saying if there is no wall there is no DACA. The Deferred Action for Childhood Arrivals program protects immigrants brought to the U.S. illegally as children.
Trump is expected to release his "legislative framework" on immigration issues Monday.
That framework will include securing the borders and providing a permanent solution on DACA, according to White House press secretary Sarah Huckabee Sanders.
Sanders did not use the word "wall" in describing the framework.
When it comes to NAFTA, Trump is also wrong, Fox said.
Trump wants major changes to the trade agreement between the U.S., Mexico and Canada because, he said, the current agreement is unfair to the U.S.
Negotiators opened a week-long round of talks on NAFTA on Tuesday. It's the sixth and penultimate round of talks, which are supposed to conclude by the end of March to avoid a clash with Mexico's general elections.
"We want to stay in NAFTA. We want an improved NAFTA. But if we are kicked out of it we have choices," Fox said, noting that the U.S. is only 20 percent of the world economy.
He said Mexico could turn to China, for one.
"I don't know why [Trump] has to sacrifice U.S. corporations, global corporations. I don't know why he has to sacrifice ... American people by not joining in. Trading is a win-win situation. Trading is a creator of wealth," said Fox.
— Reuters contributed to this report.