Today marks the 10th anniversary of President Ronald Reagan’s death at age 93. The excerpt below, from The President’s Speech by C. Edwin Vilade, a book that tells the stories behind some of the most memorable presidential addresses in American history, tells the story behind Reagan’s most famous speech: his “Address on East-West Relations” delivered in Berlin in 1987 that contained the line, “Mr. Gorbachev, tear down this wall!”

An indelible image of Ronald Reagan is him standing near the Brandenburg Gate within sight of the infamous Berlin Wall and almost shouting, “Mr. Gorbachev, tear down this wall!” It is great theater, but ironically, the immortal words almost did not make it into the speech at all. Only Reagan’s rhetorical instincts, and the arguments of his speechwriter, preserved them for history.

Reagan saw some hope for increased freedom within the Soviet bloc, including Berlin, and decided to visit West Berlin in 1987 after an economic summit meeting in Italy. He set his speech at the historic Brandenburg Gate, which had been kept closed since the city was divided. He wanted a speech that would be as memorable as Kennedy’s “Ich bin ein Berliner” speech.

Speechwriter Peter Robinson was assigned to produce a draft. He was told only that the president would speak at the Berlin Wall, there would be a large crowd, and he “probably ought to talk about foreign policy.” Not content to sift through State Department white papers and country briefings, Robinson left for Berlin.

In his book, How Ronald Reagan Changed My Life, Robinson recalls that the ranking diplomat mainly advised him on what not to say—particularly warning him against bashing the Soviets, or mentioning the Wall. Germans had gotten used to it, he said, and any statement about the Wall would be in bad taste. The diplomat instead broached several pedestrian ideas such as increasing air routes to Berlin and turning Berlin into a conference center.

That night, Robinson says, he accepted a dinner invitation among ordinary Germans. When he asked if fellow guests had “gotten used to” the Wall, one said he would never get used to it because he hadn’t seen his sister, who lived on the other side of the wall, for twenty years. His hostess erupted that if Gorbachev was serious about peace he would “tear down this wall.” When Robinson returned to Washington, and after many revisions, he put the phrase in the speech.

While Robinson claims that he originated the line, others have different recollections. Richard Allen, a White House national security adviser, remembers a 1978 trip to Berlin when he was an aide to then-Governor Reagan. Standing near the Wall, Reagan said, “We’ve got to find a way to knock this thing down.” Aides recall him occasionally mentioning that he would like to see the wall come down during staff meetings years before the Berlin speech. Reagan himself does little to clarify the origin. In his autobiography, he quotes the “tear down” passages, but merely says that he “felt strongly” about them, not that he or anyone else originated them.

Regardless of who thought of it or wrote it first, the line almost didn’t make it into the speech. White House and State Department foreign policy experts were determined to take every opportunity to further improve relations with the Soviets. They would never agree to high-profile saber-rattling by the president within sight of the Berlin Wall. Robinson and his fellow speechwriters knew this, and pulled a fast one to keep the phrase in the speech.

Reagan was to give nine speeches on his European trip, and they bundled the Berlin draft among them, delivering them to the foreign policy reviewers late in the week. The writers knew the policy wonks would not have time to read the whole stack and remove the offending language before their regular Monday morning speechwriting meeting with Reagan.

At the meeting, Reagan remarked that he liked the phrase, and the speechwriters were exultant. With his backing, “tear down this wall” stood a good chance of staying in. The opposition continued, though. Colin Powell, then on the National Security Council, repeatedly tried to have it excised because it might insult the Soviets and cool relations. Chief of Staff Howard Baker thought it should be dropped because it was “unpresidential.” The attempts to remove it continued even after the President left on the European trip. But the speechwriters stood firm, pointing out that Reagan wanted the line in.

Watch Reagan deliver the famous line: