And let's not even talk about the Great Wall of China, the construction of which began hundreds of years before that.
So the promise by President Donald Trump to build a wall between the United States and Mexico is not exactly a novel idea. Thousands of miles away, Hungary is building a border wall to try to keep out would-be migrants.
But isn't this supposed to be a new era in global affairs? The era following the fall of the Berlin Wall and the lifting of what Winston Churchill called an "Iron Curtain" dividing Europe? An era in which the global system trumped all and national borders were softened because of international financial interdependence?
Ethnic tension, national rivalries and mass migrations seem to be permanent parts of the human condition. And nearly 26 years after the Berlin Wall fell, barriers around the world still separate neighbor from neighbor.
What we are seeing now is walls built not to keep people in, as was the purpose of the Berlin Wall, but to keep people out. And more and more of them are being built around the world.
So do border walls work?
Not according to Ruben Andersson
, an anthropologist at the London School of Economics and Political Science and the author of a book titled "Illegality, Inc.: Clandestine migration and the business of bordering Europe."
For one thing, Andersson said, walls tend to be built for domestic political reasons by governments that want to be seen to be doing something about migration. For another, it seems that where there's a wall, there's a way. In other words, people who want to cross a border badly enough will find creative ways to circumvent a wall -- even if it means taking greater risks by crossing elsewhere.
"These fences are not solving anything," Andersson said. "Numbers are not going down. People will find a way."
"Fences also generate novel and more dramatic entry methods, such as the collective 'runs' at the fences we have seen at various borders in recent years," Andersson said, citing events in the Spanish North African enclaves
of Ceuta and Melilla in 2013 and 2014.
Here is a look at some of the walls now in place. But only some of them. There are many.
U.S. and Mexico -- Wall talk
A wall between the United States and Mexico has been considered seriously since at least 2006, when a bill was passed by both houses of Congress -- and signed by former President George W. Bush -- with partial funding for the possible construction of 700 miles of fencing along the border.
The issue has been raised a number of times since, and it has now been placed at the center of the political agenda by Trump.
He has made a high-profile trip to the border. He has promised to make Mexico pay
for construction of the wall.
And he has forced every other candidate to take a position on the issue. The U.S.-Mexican border is nearly 2,000 miles long.
Ireland -- Once dividers, now tourist attractions
There has long been bitterness in Northern Ireland between loyalists, who want the province to remain part of the UK, and nationalists, who want it to join the Republic of Ireland.
During the period known as The Troubles, between 1968 and 1998, more than 3,600 people were killed.
Barriers known as Peace Walls were built of stone and steel in various areas of Northern Ireland to keep the two communities apart -- effectively, to keep people from killing each other. They were meant to protect neighborhoods and restore some sense of peace.
But over time, since the Good Friday accords
, they have become less necessary. Tensions remain but the killing has stopped.
The walls, however, remain.
In Belfast, the capital of Northern Ireland, the walls have become tourist attractions. Those in West Belfast are visited most.
And if a visitor goes to the right spot, he or she can sign the wall, joining previous signatories that include former U.S. President Bill Clinton and the Dalai Lama.
Spain and Morocco -- Scaling the wall
Spain has two tiny enclaves carved out of the North African country of Morocco: Ceuta and Melilla. And it has fenced them in.
The reason: Migrants who manage to set foot in either of those enclaves have stepped on Spanish soil, and therefore the soil of the European Union. And they can apply for asylum and be judged according to EU procedures.
That's a far cry from being turned away at the border.
The barriers consist of double fences, equipped with anti-climbing mesh. They are patrolled by guards.
Still, several thousand migrants from Africa and Arab countries reportedly scale the fences each year.
Israel, Palestinian territories -- Security wall or land grab?
Israel, acting in the name of security, has built barriers or partial barriers to separate itself from the Palestinian territories in the West Bank and Gaza.
The barrier blocking access to Gaza stretches for more than 30 miles, with only a few guarded access points allowing access. Its construction began in 1994.
And in 2002, Israel began building a wall to separate itself from the West Bank, to the consternation of Palestinian authorities and some international observers. That wall is supposed to be 420 miles long when it is competed.
Israel's military says the West Bank's security fence -- it is mostly barbed wire rather than concrete -- has made it more difficult for terrorists to cross the border.
"In areas where the fence has been completed, such terrorist attacks have dramatically declined, " the Israel Defense Forces website
But the advocacy Stop the Wall website
says the fence amounts to an annexation of 46% of the West Bank.
The Koreas -- A wall that may or may not exist
North Korea and South Korea have been divided by a demilitarized zone since combat between them ended in 1953. Each side agreed to pull its troops back 2,200 yards from the front line, creating a 2.5-mile no-man's land.
But is there a wall?
North Korea says there is one. Officials from the North say that South Korea and the United States built a concrete wall along the DMZ in the late 1970s. South Korea and the U.S. deny this.
But North Korean officials insist the wall is there, with earth mounded up against it so that it cannot be seen from the southern side.
In any event, the DMZ would be hard for anyone to cross without attracting attention of the soldiers on either side of it. And Korea -- wall or no wall -- remains divided in two.
Hungary -- A wall in progress
As Europe grapples with a wave of migration of historic proportions, various countries are building walls and fences to try to hold back the flood, notably Hungary
The country -- where officials say that an average of 1,000 people per day are crossing its borders illegally -- has begun building a fence on its southern border with Serbia. The fence will be 13 feet high, officials say.
Approximately 80,000 migrants have crossed into Hungary this year, most of them from Iraq, Afghanistan and Syria, where a brutal civil war continues unabated after more than four years.
Most of the migrants want to move to wealthier EU countries such as Germany.
In addition, Bulgarian authorities are defending the country's border with Turkey by building a fence topped with coils of razor wire.
And Britain has said it will build a fence more than two miles long in Calais, France, at the entrance to the tunnel under the English Channel. Migrants have gathered in large numbers in Calais, hoping to stow away in trucks and make the crossing into Britain.