Editor's note: Nicolaus Mills is professor of American studies at Sarah Lawrence College and author of "Winning the Peace: The Marshall Plan and America's Coming of Age as a Superpower."
(CNN) -- The White House has announced that on Wednesday, at the invitation of German Chancellor Angela Merkel, President Obama will speak in Berlin at the city's landmark Brandenburg Gate. The president's subject will be the transatlantic alliance and the enduring bonds between the United States and Germany.
Berlin comes as a welcome relief for Obama. It gives him a chance to put aside for the moment the difficulties he is having in the Middle East and with the National Security Agency spying scandal. The president's Berlin appearance also reminds us that he is following in historic footsteps.
June 26 marks the 50th anniversary of President John F. Kennedy's famous "Ich bin ein Berliner" speech, praising the citizens of West Berlin for their refusal to be intimidated by the massive East German-built wall that since 1961 had divided their city.
The reaction of the crowd listening to Kennedy address them in front of West Berlin's City Hall was so overwhelming that, on the plane leaving Germany, he remarked to his aide, Ted Sorensen, who had written most of his speech, "We'll never have another day like this one as long as we live."
Kennedy is always given style points for his Berlin speech because of its easy-to-remember rhetoric. But the speech is worth recalling today because it amounted to such a profound pivot away from the prevailing nuclear logic of the Cold War. In Berlin, Kennedy recast how he believed the Cold War should be waged in the future in a way that made his thinking clear to the European and American public.
For Kennedy, the chance to speak near the Berlin Wall two years after it was built was a major opportunity to redefine his foreign policy leadership.
In his 1961 Vienna summit meeting with Soviet premier Nikita Khrushchev, Kennedy had gotten off to a rocky start. In 1962, during the Cuban missile crisis, he had regained his footing. He had resisted calls by some of the Joint Chiefs of Staff for a massive airstrike against Cuba and made sure he and the Soviets avoided backing each other into a nuclear exchange.
In Berlin, Kennedy showed that he had learned from both confrontations. Instead of treating the Cold War as simply a battle over which side had the most military power and the will to use it, he framed it as a battle that also included the fate of captive peoples and their right to self-determination.
It was an emphasis that would bear fruit in the Prague spring of 1968, in Poland's Solidarity movement and finally in Ronald Reagan's 1987 Brandenburg Gate speech with its memorable line, "Mr. Gorbachev, tear down this wall!"
Kennedy's rhetoric in Berlin was equal to his good intentions. "Two thousand years ago, the proudest boast was 'civis Romanus sum' ("I am a Roman citizen"). Today, in the world of freedom the proudest boast is 'Ich bin ein Berliner,' " Kennedy declared. His words paid tribute to those Germans trapped in a divided Berlin, but his overriding point was, "Freedom is indivisible, and when one man is enslaved, all are not free."
Kennedy was doing the opposite of saber-rattling. He was updating the ideas behind the Declaration of Independence so they spoke directly to contemporary Europe. When his audience heard Kennedy's words, they were reminded of the Berlin Airlift of 1948, in which America responded to the Soviet ground blockade of West Berlin with an airlift that brought West Berliners the food and supplies they needed without U.S. troops firing a shot.
Earlier in June 1963, Kennedy had established the groundwork for his Berlin speech with an address he gave at American University in Washington. There, he spoke about establishing the conditions for an "attainable peace" that was neither a Pax Americana nor a peace of the grave.
The Soviet Union, Kennedy cautioned, needed to abandon its distorted view of an America ready to unleash a preventative nuclear war, but at the same time America needed to make sure that it did not fall into the same trap as the Soviets by seeing Russia through a distorted ideological lens.
Ever the practical politician, Kennedy conceded that he had no "magic formula" for bringing about such a change in the world's two superpowers, but it was possible, he concluded, to debate the Cold War without each side making new threats. "We can seek a relaxation of tensions without relaxing our guard," he insisted.
Today, the American University speech is widely praised, but at the time, the speech was seen primarily as a policy statement. The public reaction to the speech was minimal. One day later, the American University proposals were replaced as a front-page story by the highly charged racial confrontation between the Kennedy administration and Alabama Gov. George Wallace over the admission of two African-American students to the formerly all-white University of Alabama.
Berlin was a different story in terms of its popular impact and a sign that Kennedy was becoming increasingly sophisticated in using his personal popularity to promote policy change.
In Berlin, the still-young president took advantage of being on the global stage to make it easier for friend and foe alike to see him as a leader eager to steer America and the world away from nuclear confrontation.
His efforts were not wasted. Two months after his Berlin speech, the United States, Great Britain and the Soviet Union signed the Limited Nuclear Test Ban Treaty, the first such agreement since atomic bombs were dropped on Hiroshima and Nagasaki.
Follow @CNNOpinion on Twitter.
Join us at Facebook/CNNOpinion.
The opinions expressed in this commentary are solely those of Nicolaus Mills.