What was the primary reason for constructing the Berlin Wall?

The Berlin Wall was primarily constructed to prevent East German citizens from fleeing to the West.