If good fences make good neigh bours, then the world is experiencing an unprecedented outbreak of neighbourliness. They used to wall cities. Now they wall whole countries.
The latest country to start building a wall sorry, a "security fence" is Thailand, which has just announced plans to build a physical barrier along the most inaccessible 75 kilometres of its frontier with Malaysia.
The goal, says Bangkok, is to stop "terrorists" from crossing into Thailand's restive Muslim-majority southern provinces from northern Malaysia, where the people share the same language and religion. If experience elsewhere is any guide, the whole border will be walled sooner or later.
India is well on the way to being walled (except along the Himalayas, where the mountains do the job for free). The barrier along its 3,000-kilometre border with Pakistan is largely complete except in the parts of Kashmir where the steep and broken terrain precludes the construction of the usual two-row, 3-metre-high fence.
And India is now building an even longer barrier 3,300 kilometres to halt illegal immigration from Bangladesh.
While India's walls keep unwelcome intruders out, the barriers around North Korea are meant to keep North Koreans in. The original fortifications along the Demilitarized Zone between North and South Korea, which have been continually improved since the 1950s, were built mainly to stop infiltration by North Korean troops or saboteurs.
However, the fence that Beijing is now building along its own frontier with North Korea is a precautionary measure to stop an immense wave of refugees from entering China if the regime in Pyongyang collapses.
The majority of the new walls springing up around the world are there to stop either terrorist attacks or illegal immigration, but sometimes they also serve as a unilateral way of defining a country's desired borders.
That is certainly true of the 2,700 kilometres of high sand or stone berms backed by wire fences, mines, radar, troop bunkers and artillery bases that seal off Western Sahara, annexed by Morocco in 1975, from the camps in Algeria. Many of the former inhabitants waged a guerrilla war from these camps until the 1991 ceasefire.
It is equally true of the wall that Israel is building through the occupied West Bank. The country has long had heavily mined and monitored barrier fences along its external frontiers with Egypt, Jordan, Syria and Lebanon and around the Gaza Strip, but the wall in the West Bank does not follow the ceasefire line of 1967.
Instead, it penetrates deep into the Palestinian territories at a number of points to leave Jewish settlement blocs on the Israeli side, and cuts off (Arab) East Jerusalem from the West Bank entirely.
Pakistan is building a 2,400-kilometre fence with Afghanistan; Uzbekistan has built a fence along its border with Tajikistan; the United Arab Emirates is erecting a barrier along its frontier with Oman; and Kuwait is upgrading its existing 215-kilometre wall along the Iraqi frontier.
But the most impressive barriers are certainly around Saudi Arabia. The Saudi kingdom has been quietly pursuing an $8.5 billion project to fence off the full length of its porous border with Yemen for some years, but the highest priority now is to get a high-tech barrier built along the 900-kilometre border with Iraq.
"If and when Iraq fragments, there's going to be a lot of people heading south," said Nawaf Obaid, head of the Saudi National Security Assessment Project.'
The new wall will include buried movement sensors, ultraviolet night-vision cameras, face recognition software and quite probably automated weapons, in addition to the usual electrified fences, concertina wire, dry moats and mines.
By comparison, the apparently endless debate about building a relatively low-tech fence along the 3,360-kilometre U.S. border with Mexico to cut illegal immigration seems like an echo from an innocent past.
The reason the U.S. is incapable of controlling its Mexican border is political, not financial or technological: powerful domestic lobbies work to ensure a steady supply of "undocumented" workers who will accept low wages.
Congress has authorized President Bush to build a fence along about 1,125 kilometres of the border, but he will stall as long as he can while experimenting with a "virtual fence."
No equivalent lobby operates in the European Union, and it is only a matter of time before really serious barriers appear on the EU's land frontiers, especially with Turkey, Russia, Belarus and Ukraine.
The walls are going up all over the world, and most of them will not come down for a long time, if ever.