West Berlin was a worry and an embarrassment for the Soviet Union in 1961.
At the Vienna Summit of June 1961, therefore, Khrushchev demanded that the US leave West Berlin within six months. Kennedy refused and instead guaranteed West Berlin's freedom.
On 13 August, Khrushchev closed the border between East and West Berlin and started building the Berlin Wall. At first, the Russians regarded it as a propaganda success, but as time went on, it became a propaganda disaster - a symbol of all that was considered bad about Soviet rule.