As President Trump seeks to fulfill his promise to build a wall on the southern border, he is getting support from leaders in countries that have erected their own border barriers -- and who hail those projects as critical to battling illegal immigration.

Trump, too, has cited countries like Israel -- which has a network of walls and fences on its borders -- as proof that barriers work as he seeks to convince Congress to fund a wall or steel barrier to the tune of $5.7 billion.

BIPARTISAN COMMITTEE BEGINS BORDER SECURITY TALKS, STILL DIVIDED OVER PHYSICAL BARRIER

Democrats in Congress have refused to entertain his proposal, calling a wall both “immoral” and ineffective, and only agreeing to $1.3 billion in more general border security funding. That led to a month-long shutdown, which temporarily ended last week. Funding is set to expire again on Feb. 15, and Trump has warned that he is prepared to declare a national emergency if no wall funding is agreed to.

The president said Friday there's a good chance he'll take that step, while saying House Speaker Nancy Pelosi is "hurting this country so badly" with her stance on the wall.

But despite claims that such barriers are ineffective, in countries such as Israel and Hungary, top officials say they are a key mechanism in keeping a border secure and illegal migration flows down.

“Since we built a fence, and since the police and army have been there, we basically have no illegal migrants on the territory of the country,” Hungarian Foreign Minister Peter Szijjarto told Fox News in an interview last week. “There are constant attempts to break through, but the infrastructure itself, namely the fence, and police and the army, make it impossible to get in.”

"So that's a success," he said.

Hungarian soldiers patrol the Hungarian-Serbian border near the village of Tompa, Hungary, June 14, 2017. REUTERS/Laszlo Balogh

Hungary was on the frontlines of the European migration crisis in 2015, when tens of thousands of migrants from the Middle East walked through the streets of Budapest and took over railway stations and other buildings. Szijjarto said that that led to Hungarians demanding action to secure the border.

Prime Minister Viktor Orban’s government subsequently built two fences on the border with Serbia and Croatia and also deployed the military to the border. Orban’s Fidesz Party went on to win a supermajority last year in the Hungarian national election -- an election fought primarily over the question of combating illegal immigration.

Szijjarto did not want to comment on the domestic politics surrounding the shutdown in the U.S., but said the Hungarian government was sympathetic to Trump’s push for the wall.

HUNGARY'S PRO-TRUMP, POPULIST GOVERNMENT PUSHES SOROS CRACKDOWN

“When it comes to internal developments in the U.S., of course, we don’t want to comment, but what I can tell you is that we totally understand the endeavors of your president to protect the people and the territory of your country, and in Hungary it has been proven that such a solution is a good solution,” he said.

In Israel, Prime Minister Benjamin Netanyahu's government built a wall in the West Bank as a counter-terrorism measure, as well as a "smart fence" on the southern border with Egypt -- Israel’s longest border -- to prevent migration from Africa.

Israel’s Ambassador to the U.N. Danny Danon told Fox News Thursday that the border once had a “flimsy wire fence” that allowed smugglers and traffickers in the Sinai Peninsula to enter Israel, but that was changed in 2010.

“From 2010-2013, we built a system of two layers of fencing, with advanced surveillance equipment,” he said. “And the results speak for themselves: border crossings dropped by over 99 percent, from 9,570 in the first half of 2012 to 34 in the first half of 2013.”

Netanyahu has repeatedly hailed the success of the border. In 2017, he said "President Trump is right."

"I built a wall along Israel's southern border. It stopped all illegal immigration. Great success. Great idea," he tweeted.

Recently, responding to the viral 10-year challenge meme, he posted side-by-side pictures of the fence on the Egyptian border in 2009 and 2019.

Trump has also posted videos about the success of Israel's border security measures, and it has picked up some traction. This month, New York Times columnist Bret Stephens asked: "Why can’t Democrats and Republicans simply agree to build additional smart fencing in places where it’s missing and call it, for political effect, an 'Israeli-style barrier'?"

Those opposing the border wall say there are other border protection measures that do a better job, such as drones and other surveillance.

"Fencing, infrastructure, technology. That is what the experts tell us we should do to really secure the border," Sen. Bob Casey, D-Pa., told CNN earlier this week.

But Szijjarto said that a fence is “the heart of the protection of the border.”

“Look, we have a much shorter border than what you have with Mexico, of course. But without the fence it would be impossible to protect almost 500 kilometers of land border,” he said. “It would be impossible because otherwise how would you make it? So if you don’t have a physical infrastructure you cannot seal off the green border.”

He also dismissed the difference between a fence and a wall as a “technical question.”

“It’s an infrastructure which physically makes it impossible for people to cross,” he said.

CLICK HERE TO GET THE FOX NEWS APP

Democrats, meanwhile, have dug in on opposition to more border wall funding, and Trump has recently indicated he might not look to Congress for permission in the end. Pelosi, D-Calif., said Thursday there would be no money for a wall in compromise legislation being hashed out in Congress.

"There's not going to be any wall money in the legislation," she said, though she later added that she was open to some "enhanced fencing" on parts of the border.