KEY POINTS:
If good fences make good neighbours, then the world is experiencing an unprecedented outbreak of neighbourliness. They used to wall cities. Now they wall whole countries.
India is well on the way to being walled - except along the Himalayas, where the mountains do the job free. The barrier along India's 3000km border with Pakistan is largely complete, except in the parts of Kashmir where the steep and broken terrain precludes putting up the usual two-row 3m fences, with concertina-wire and mines between them.
And India is now building an even longer barrier, of 3000km, to halt illegal migrants from Bangladesh.
Most of the walls springing up around the world are there to stop terrorist attacks or illegal migration, but sometimes they also serve as a unilateral way of defining a country's desired borders.
That is true of the 2700km 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 from which many of the former inhabitants waged a guerilla war 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 certain places to leave Jewish settlement blocs on the Israeli side, and it completely cuts off (Arab) East Jerusalem from the West Bank.
Pakistan is building a 2420km fence with Afghanistan; Uzbekistan has a fence along its border with Tadzjikistan; the United Arab Emirates is erecting a barrier along its frontier with Oman; and Kuwait is upgrading its existing 215km wall along the Iraqi frontier.
But the most impressive barriers are around Saudi Arabia. For years the Saudi kingdom has been quietly pursuing a US$8.5 billion ($12.4 billion) project to fence the full length of its porous border with Yemen, but the priority now is to get a high-tech barrier built along the 900km 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, "and that is when we have to be prepared."
The wall will include buried movement sensors, ultraviolet night-vision cameras, face-recognition software and probably automated weapons in addition to the usual electrified fences, concertina wire, dry moats and mines.
By comparison, the endless debate about building a relatively low-tech fence along the 3360km United States border with Mexico to cut illegal migration seems like an echo from an innocent past.
The European Union's feeble gestures towards curbing illegal immigrants from Africa - with fences around the Spanish enclaves of Ceuta and Melilla on the Moroccan coast, and naval patrols off the Canary Islands - seem merely pathetic.
The reason that the United States is incapable of controlling its Mexican border is political, not financial or technological: powerful domestic lobbies work to ensure a steady supply of "undocumented" Mexican workers who will accept very low wages because they are in the US illegally.
President Bush has been authorised by Congress to build a fence along about 1125km of the border, but he will stall as long as he can while experimenting with a so-called "virtual fence."
No equivalent lobby operates in the European Union, and it is only a matter of time before really serious barriers appear on EU land frontiers, especially with Russia, Belarus, Ukraine and Turkey.
The walls are going up all over the world, and most of them will not come down for a long time, if ever.
* Gwynne Dyer is a London-based independent journalist.