Between 1945 and 1961, an estimated 2.7 million East Germans escaped to the West through West Berlin. To stop the migration, East Germany built a wall that severed the city of Berlin and stood for the next 28 years before being dismantled 30 years ago Saturday. Even after the wall was up, some 5,000 people successfully escaped East Berlin, while more than 300 people were killed making similar attempts to flee, seeking freedom in the West.

The lesson: The wall didn’t destroy people’s impulse to migrate; it just rendered those impulses more terrifying and deadly. Its fall was celebrated as a triumph of freedom over oppression, but the scars of living in a demarcated place persist in Berlin. This is a history people in the United States should understand to better recognize the violence and harms of our own expanding wall along the U.S.-Mexico border and all that it stands for.

After World War II, Germany was divided into zones under control of the Western Allies and the Soviet Union. Berlin was similarly divided, with West Berlin maintaining a route to the western zone and becoming the principal destination for people fleeing the Communist East. Berlin became a physical, ideological and symbolic front in the growing Cold War, its division demarcating a line between Communism and democracy.

In the late 1940s, the Kremlin decided to close off the land and canal routes used to supply West Berlin. The Allies responded with the Berlin Airlift, which moved supplies to West Berlin and allowed the city to remain an island of freedom 100 miles behind the Iron Curtain within East Germany.

Berlin remained a focal point for Cold War tension. After their first meeting in summer 1961, President John F. Kennedy and Soviet Premier Nikita Khrushchev both increased military spending and presence on their respective sides of the city as a show of strength.

But it was more than geopolitical tension that led to the construction of the Berlin Wall. It was the embarrassing flow of people out of the East. This migration was at times a headache for the Western allies, but it was a nightmare for the East, showcasing the failures of the government for all the world to see. And so East Germany built a wall.

Walter Ulbricht, the East German party chief and head of state, had asked for permission to close the border to stop refugees from seeking asylum in West Berlin as early as the 1950s. The Soviet Union urged Ulbricht to moderate some of his harsh domestic policies rather than close the border, to avoid damage to the reputation of the entire Communist bloc.

Then in 1961, Khrushchev decided to drop an iron ring around West Berlin. Ulbricht launched a massive movement of troops, cement posts and barbed wire as the clock struck midnight on Aug. 12. As people in East Berlin became aware of what was happening, hundreds tried to cross into the West before it was too late but were denied passage. By morning, the western zone of Berlin had been surrounded by the first iteration of the wall, and the city was thrown into crisis.

Overnight, streets, subway lines and rivers were divided. Families, friends, lovers, colleagues and others were separated. More than 100,000 Easterners had been commuting to work in the West while thousands of Westerners worked in East Berlin. There were reported cases of children who had been visiting grandparents and were suddenly cut off from their parents’ homes.

What began in the 1950s as guard towers and checkpoints demarcating the line between the eastern and western zones in Berlin became in 1961 an imposing physical barrier. Over the next several years, the wall took shape: 13-foot-high concrete walls standing on either side of a no man’s land of razor wire, soft sand to show footprints and land mines, all under the constant surveillance of guards in gun towers. The Western powers accepted the wall because they feared the Soviet Union would invade West Berlin, leading the world down the path to World War III.

The East, however, promoted the wall as a way to stop Western influence and propaganda. The reality was quite different as thousands sought to escape and cross the barrier. East Germans who were subject to direct personal abuse and surveillance or who saw friends or relatives imprisoned for dissent were willing to risk their lives to break through the Berlin Wall. For others, it was the desire to reunite with family or loved ones that pushed them to escape. In 1962, two young men made a break for freedom, and one of them made it over the wall badly cut by the barbed wire. His comrade was hit with machine-gun fire. He fell from the wall, was shot again and was left to die in sight of the Western border guards who could do nothing to help him.

The Berlin Wall cost an estimated $25 million and tens of thousands of man-hours to build, but the true cost was borne by the German people — and the lives of those killed trying to escape across it. As an imposing feature of the landscape, it helped reassert East German authority, but it showed the level of tyranny that the government was willing to exert to maintain authority. Severing a city from itself, the wall helped lead to the creation of two distinct German societies.

The border was opened on Nov. 9, 1989, during the East German “Peaceful Revolution.” Excited Berliners began to tear down the wall, and then the East German army joined in, taking the next two years to dismantle it all. But even after the physical and political barriers fell, for years after reunification Germans spoke of the “Mauer im Kopf,” the wall in the mind, that continued to separate East and West. Berliners on different sides maintained different perceptions about individual freedom and affluence and held distinct memories and histories of Germany.

In the 30 years since the fall of the Berlin Wall, physical barriers at borders have continued to proliferate around the world. Since 1989, the United States has continually sought to militarize its own southern border, actions at stark odds with the language and rhetoric of freedom that characterized its talk during the Cold War. Kennedy went to the Berlin Wall in 1963 and declared his support for those who lived in West Berlin, as the front line of the Cold War, and for those fled to the West. In 1987, President Ronald Reagan went to the wall and demanded it be torn down so that freedom-loving people could come to the West.

Building a wall at its southern border only affirms to the world that the United States is not committed to the cause of freedom. Human beings move because they want to be with their families, because they want freedom from persecution and harm, and because they want a better life. Walls can’t stop that. They never could.