The communists were worried that the Western powers in Berlin would influence East Germans and inspire them to rebel against their government. They were also concerned that the West would use Berlin as a base to launch military action against East Germany and the rest of the Eastern Bloc.
To eliminate these potential threats, the communists in East Berlin made several attempts to force the Western powers out of the city. In 1948, they imposed a blockade on West Berlin, which cut off the city's supplies and utilities. In 1958, they issued an ultimatum demanding the Western powers withdraw from Berlin within six months, but the Western powers refused.
Eventually, the communists gave up their efforts to expel the Western powers from Berlin. The Berlin Wall, which was erected in 1961, effectively divided the city and prevented East Germans from escaping to West Germany. The Western powers remained in Berlin until the reunification of Germany in 1990.