Israeli soldiers patrol next to the border fence on border with Syria, in the Israeli-annexed Golan Heights. (Uriel Sinai/GETTY IMAGES)

Fearful that the Syrian civil war, jihadist terrorists or Lebanese Hezbollah fighters will spill into Israel, the country’s military engineers are rushing to complete their latest “smart fence,” this one in the occupied Golan Heights.

Here along the tense boundary with Syria, fighting raged Thursday as Syrian rebels and government forces battled for control of a crossing in the latest violent incident that is inching the Syrian war closer to Israeli-held territory.

As the threat of spillover mounts, Israel is replacing an old, broken-down fence — so low that a goat could hop over it — with an intimidating steel barricade. The fortification features concertina and razor wire, touch sensors, motion detectors, infrared cameras and ground radar.

When the 45-mile fence is finished in the coming months, Israel will have taken another big step in surrounding itself with barriers. Rather than tearing down old walls, Israel is rebuilding and bolstering its ring of ground fortifications, even as old threats such as Palestinian suicide bombers have receded and new ones such as a potential nuclear-armed Iran arise.

The Israelis build the world’s most sophisticated fences, drawing international delegations that want to see the latest in barrier technology. But some Israelis worry that the fences are a metaphor for weakness as much as they are for strength and that the barriers have increased a sense of isolation.

Israel's border fortification

“For me, the message is clear: The idea of peace with our neighbors is going away, and the fences are a symbol of that reality,” said retired Brig. Gen. Nachman Shai, a member of the Israeli parliament and a former chief spokesman for the Israel Defense Forces.

Israeli military commanders say the fences work, offering protection against crowds of protesters and incursions by gun smugglers, illegal migrants and enemies who travel on foot. At the same time, they concede that in the battlefield of today and tomorrow, the barriers do little to protect Israel from long-range rockets fired from Lebanon, Iran or the Gaza Strip.

Last month, while on an official visit to China, Israeli Prime Minister Benjamin Netanyahu invoked a tourist site that reminded him of home.

“Just like the Chinese protected themselves and defended themselves with the Great Wall,” Netanyahu said, “so we will continue to defend ourselves on the southern border, the Golan Heights and on all fronts.”

‘Fortress Israel’

The Israeli fence network is almost complete — in the north, along the Lebanon border, where the militant organization Hezbollah is the threat; to the northeast, along the Golan Heights boundary with Syria; to the south, abutting Egypt’s lawless Sinai Peninsula.

Israeli military engineers are drawing up plans for a final stretch along the peaceful border with Jordan from the Dead Sea to the Red Sea.

The fence line — and the accompanying watch towers, patrol roads, intelligence centers and military brigades — stretch across vast deserts to snowy mountains, along river valleys and into the Mediterranean surf.

In the West Bank, some barriers separate Palestinian farmers from their land while cocooning Israeli highways and settlements. Others carve through the contested suburbs beyond East Jerusalem and line the entire Gaza Strip boundary, where the two sets of high fence and wall encompass a no-man’s land and are equipped with remote-controlled machine guns.

Critics decry “Fortress Israel.” But no recent Israeli government has seriously proposed taking down the barriers, in part because their construction has been followed by more-peaceful periods.

Israel’s most controversial fence is the separation barrier — or “apartheid wall,” as Palestinian activists call it — that divides Israel from the West Bank, part of the land that Palestinians claim for a future state. Israel began building it in 2002 during the second Palestinian intifada, or uprising, and it is about 70 percent complete.

According to the Israel Security Agency, 146 suicide attacks occurred inside Israel from 2001 to 2009, with a stark decline after 2004. There have been no such attacks since that period.

Col. Grisha Yakubovich, head of the Civil Coordination Department in the Israel Defense Forces, credited the barrier, though he said it was only one reason that attacks have diminished and that no Israelis were killed in the West Bank last year. Israel today works closely with Palestinian security forces, he said, and targets and arrests members of alleged terrorist cells early in their development. He also credited the Palestinian Authority leadership in the West Bank, which rejects violence as a political tool.

This year, Israel finished all but the last few rugged miles of a 125-mile fence along its once-open border with Egypt’s restive Sinai. The barrier, begun in 2011 and built at an accelerated pace, was designed to stop illegal migrants, whom the Israeli government deems “infiltrators.”

Last year, Israel counted more than 10,000 illegal migrants — mostly poor refugees from Sudan and Eritrea — entering from Egypt. With the completion of the Sinai fence, the incursions have dropped to the single digits; only two people were captured last month.

“These obstacles work. Maybe they are ugly, maybe they are not nice, but they do what they are supposed to do,” said Col. Yonathan Bransky, deputy commander of the Israel Defense Forces division that patrols the Gaza Strip perimeter and the Sinai fence.

That point was disputed recently by Secretary of State John F. Kerry, who is pushing to restart peace talks between Israel and the Palestinians.

“The people who think somehow because there is a fence and because there’s been greater security and fewer people hurt are lulling themselves into a delusion that that somehow can be sustained. It cannot be,” Kerry, referring to the West Bank barrier, said to the American Jewish Committee on Monday.

Divided views

Israel once wanted relatively open borders. Beginning in the 1970s, a “Good Fence” with Lebanon allowed Christian Maronite farmers to come and go somewhat freely. But that was several conflicts ago.

In the middle of the last century, when the land was the British Mandate of Palestine, one of the first things that Jewish pioneers would erect at new farming settlements was the “stockade and watchtower,” which became symbols of the Zionist movement. After the founding of Israel in 1948, the idea of such stationary fortifications became obsolete.

“The military, almost philosophical strategy became: We do not sit back behind fences and wait for people to attack us; we strike out — we want to fight our battles on their territory, not in ours,” said Tom Segev, popular historian and author of “1967: Israel, the War and the Year That Transformed the Middle East.”

“Now, it’s back to the wall and watchtower,” Segev said. “It was the result of intifada, of terror, or resistance, whatever you want to call it, and there was the admission we can’t really live with the Arabs, they have to stay outside the fence.”

Mechi Fendel, 46, a mother of seven, lives in the southern Israeli town of Sderot, within sight of Gaza.

“If the fence was not there, then it would be easy for them to cross over the line,” she said of the residents of Gaza, which is run by the Palestinian political and militant group Hamas.

Fendel remembers fondly the days when she and her family could travel to Gaza, before Israel withdrew and transferred control of the territory to the Palestinians in 2005. Now it is closed to all Israelis.

“I guess we will feel safe when there are no terrorists who want to kill us,” she said.

A few miles away, in Gaza, Majed Wahdau, 53, grows wheat, melons and citrus on a fertile farm that abuts the Israeli fence. He said he is terrified of the barrier.

“If you approach it within 100 meters, maybe 200 or 300 meters, we never know, they will shoot you,” he said.

Israeli commanders say they must keep Gaza residents away from the fence to stop militants among them from planting explosive devices near it to kill Israeli troops patrolling the barrier.

But the fortifications remain controversial, even among some Israeli hawks.

“The time has come to tear down that wall,” Moshe Arens, a former defense minister, wrote of the West Bank barrier in a March opinion piece, in which he argued that committed terrorists could easily enter Israel through the 30 percent of the boundary that is not fenced or walled. “This monstrosity, which has cost billions, will certainly not stand there forever to be dug up by puzzled archeologists a thousand years from now.”

That doesn’t mean walls are coming down. Israeli military leaders say the barriers must remain for the foreseeable future, including in the West Bank.

“The wall stops terrorists,” Yakubovich said.

Ruth Eglash in Jerusalem and Sufian Taha in Ramallah contributed to this report.