BUDAPEST, Hungary — At the end of World War II, there were seven border walls or fences in the world. By the time the Berlin Wall fell in 1989, there were 15, according to Elisabeth Vallet, a geography professor at the University of Quebec-Montreal.

Today, as President Trump pushes his campaign promise to build a wall on the border with Mexico, there are at least 77 walls or fences around the world — many erected after the Sept. 11, 2001, terrorist attacks in New York City and at the Pentagon.

More:Pulitzer Prize-winning special report from USA TODAY NETWORK details challenges, risks and potential consequences of Trump’s planned wall

More:Trump isn't the only one who wants to build a wall. These European nations already did

More:Border walls aim to keep out migrants, but also threaten bears, deer, other wildlife

"Walls are public relations exercises where governments demonstrate that they are actually doing something," Vallet said. "They usually create more problems."

Border walls and fences have been used throughout history to separate warring nations, protect trade routes and repel migrants and refugees.

Here are some examples, past and present:

Berlin Wall

The Berlin Wall, a monumental symbol of the Cold War from 1961 to 1989, divided communist East Germany from the democratic Western side. At least 140 people died trying to flee from the eastern side, as East German soldiers along the concrete wall had orders to shoot at fugitives if there was no other way to prevent their escaping, according to the Berlin Wall Foundation. By 1989, revolutions in Poland, Hungary and other Eastern Bloc countries caused East Germany to open the blockade, prompting much celebration as the wall came down. The "fall of the Berlin Wall" led to a reunified Germany on Oct. 3, 1990.

Great Wall of China

At more than 13,000 miles long, the Great Wall of China is often called the longest feat of human engineering. It is more than 2,000 years old and took more than 1 million workers to build. The original purpose was to prevent incursions from barbarian nomads in the Third Century B.C. Now, it attracts millions of tourists each year as a symbol of Chinese civilization's enduring legacy. Yet the wall never really worked as intended. "China decided to build its wall as a security measure, but it was built in pieces, and it was never long enough," said Emmanuel Brunet-Jailly, a professor of politics and globalization at Canada's University of Victoria.

India-Bangladesh

India and Bangladesh share a 2,500-mile border, and India is nearing completion of a 1,700-mile barbed wire fence to curb immigration and smuggling. The fence is to block migrants from low-lying Bangladesh who want a better life in India. India also has a 450-mile barrier with Pakistan — a militarized "line of control" to keep out militants because of ongoing tensions between the neighboring nations.

Israel-West Bank

Israel constructed a 400-mile wall in the West Bank in 2002 after a wave of attacks by Palestinian insurgents. Critics and Palestinians often call it an "apartheid wall" because it hinders movement, trade and Palestinian livelihoods. At nearly 20 feet high, Israel's concrete wall topped with barbed wire has become a flashpoint for anger against the country. Hundreds of Palestinians stormed the wall this month on the day the Trump administration inaugurated the U.S. Embassy in Jerusalem; it was moved from Tel Aviv.

Northern Ireland's 'peace walls'

The "peace walls" in Belfast, Northern Ireland, grew from barricades erected by local communities because of sectarian rioting in 1969 between Catholic Irish nationalists, who favored unification with the Irish Republic to the south, and Loyalist Protestant Paramilitaries, who backed continued British rule. The brick-and-wire boundaries still dot the city's landscape. As relations improve, there are plans to demolish all of it by 2023.

Other notable examples: