Berlin was a divided city before the wall

At the end of the Second World War, Germany was divided into four zones of occupation under the control of the United States, Britain, France and the Soviet Union.
Berlin, although located within the Soviet zone, was also split amongst the four powers.
The American, British and French sectors would form West Berlin and the Soviet sector became East Berlin.
The division of Germany and the nature of its occupation had been confirmed by the Allied leaders at the Potsdam Conference, held between 17 July and 2 August 1945.
The Berlin Wall came to represent the ideological divisions of the Cold War

The relationship between the former wartime Allies, although tense from as early as 1942, became increasingly strained as they struggled to reach agreement on the shape of post-war Europe.
By 1945, the United States and the Soviet Union had begun to emerge as ideologically opposed 'superpowers', each wanting to exert their influence in the post-war world.
Germany became a focus of Cold War politics and as divisions between East and West became more pronounced, so too did the division of Germany.
In 1949, Germany formally split into two independent nations: the Federal Republic of Germany (FDR or West Germany), allied to the Western democracies, and the German Democratic Republic (GDR or East Germany), allied to the Soviet Union.
In 1952, the East German government closed the border with West Germany, but the border between East and West Berlin remained open. East Germans could still escape through the city to the less oppressive and more affluent West.
The Berlin Wall developed over time

In 1961, rumours spread that measures would be introduced to strengthen the border and stop East Germans from leaving for the West.
On 15 June, East German leader Walter Ulbricht declared that 'no one has the intention of building a wall', but on the night of 12-13 August a wire barrier was constructed around West Berlin.
Established crossing points between the Western and Soviet sectors were closed, dividing neighbourhoods and separating families overnight.
From this barbed wire barricade, the Wall would eventually develop into a fortified concrete structure encircling West Berlin and isolating it from the surrounding East German territory.
The Berlin Wall was heavily guarded

The Berlin Wall was not one wall, but two. Measuring 155 kilometres (96 miles) long and four metres (13 feet) tall, these walls were separated by a heavily guarded, mined corridor of land known as the 'death strip'.
It was under the constant surveillance of armed East German border guards who were authorised to shoot anyone attempting to escape into West Berlin.
By 1989, the Wall was lined with 302 watchtowers
More than 100 people died trying to cross the Berlin Wall over the course of its 28-year history.
But the Wall was just one part of the larger 'inner German border' that separated East and West Germany, and hundreds more were killed trying to cross other fortified border points.
The Berlin Wall fell on 9 November 1989

In 1989, political changes in Eastern Europe and civil unrest in Germany put pressure on the East German government to loosen some of its regulations on travel to West Germany.
At a press conference on 9 November, East German spokesman Günter Schabowski announced that East Germans would be free to travel into West Germany, starting immediately. He failed to clarify that some regulations would remain in place.
Western media inaccurately reported that the border had opened and crowds quickly gathered at checkpoints on both sides of the Wall.
Passport checks were eventually abandoned and people crossed the border unrestricted.
The political, economic and social impact of the fall of the Berlin Wall further weakened the already unstable East German government.
Germany reunited on 3 October 1990, 11 months after the fall of the Berlin Wall.