Their remarks, made first in private during Mr. Obama’s state visit here, and then publicly in a joint news conference, were evidence that the surveillance controversy set off by leaked documents from a former National Security Agency contractor, Edward J. Snowden, had followed the president overseas as he concluded a three-day diplomatic trip to Europe.
That disclosure has been particularly provocative in Germany, where the history of the Nazi era and then postwar surveillance in Communist East Germany have left a legacy of national concern for privacy and civil liberties.
Ms. Merkel, who grew up in East Germany, reflected that sensitivity in raising the issue with Mr. Obama. Yet she also expressed support for such operations, if balanced by “due diligence” to guard citizens’ privacy rights, and said Germany had received “very important information” from its cooperation with the Americans against international terrorism.
The leaders’ exchanges on that and other issues preceded Mr. Obama’s outdoors address to about 4,500 people at the historic Brandenburg Gate. While Presidents Ronald Reagan and Bill Clinton each gave memorable addresses there, Mr. Obama was the first to speak on the eastern side, long closed off by the Berlin Wall, built by the former Soviet Union. Mr. Reagan, from the western side, famously challenged the Soviet leader Mikhail Gorbachev in 1987: “Mr. Gorbachev, open this gate! Mr. Gorbachev, tear down this wall!” It fell two years later.
Mr. Obama’s address came 50 years after President John F. Kennedy, in another celebrated speech here, spoke outside a town hall to affirm support for Germans against the nuclear-armed Soviets. By contrast, Mr. Obama used his speech to propose that the United States and Russia reduce their nuclear arsenals by a third.
“Our fates and fortunes are linked like never before,” he said. “We may no longer live in fear of global annihilation, but so long as nuclear weapons exist, we are not truly safe.”
Officials said 4,500 people were present, fewer than the 6,000 tickets distributed — perhaps reflecting the scorching heat. Even so, that was far fewer than the 450,000 who saw Mr. Kennedy or the 200,000 who packed a park to hear Mr. Obama in 2008, when he was a presidential candidate. Then, Ms. Merkel had discouraged his use of the Brandenburg Gate site, saying it should not be used for politicking. This time she invited him to use it.
The anticipation of Mr. Obama’s address, though, was offset by attention to revelations of the breadth of the two United States surveillance programs — one a huge database logging American phone calls and the other, called Prism, to monitor foreign communications at Internet companies and through phone logs without individual warrants.
At their news conference, Ms. Merkel said she and Mr. Obama had discussed the surveillance issue at length, indicating that it took precedence over subjects like the global economy and conflicts in Syria and Afghanistan. In turn, Mr. Obama justified the operations at length.
“We know of at least 50 threats that have been averted because of this information, not just in the United States but in some cases threats here in Germany,” he said. “So lives have been saved.”
He did not provide details. But Ms. Merkel cited the “Sauerland cell” in Germany as an example of the benefits of surveillance and information sharing with the Americans. In that case, four Islamic militants were sentenced to up to 12 years in prison in 2010 for plotting terrorist attacks against American targets in Germany. They were apprehended in 2007 and confessed in 2009. The Central Intelligence Agency was presumed at the time to have tipped off the German authorities.
Yet Ms. Merkel, sensitive to Germans’ privacy concerns and facing re-election this year, made clear that she had expressed her own concerns. “Although we do see the need for gathering information,” she said, “there needs to be due diligence.”
Mr. Obama countered that he made sure when he took office that the programs “were examined and scrubbed.” He explained, as he has to American audiences, that the United States monitored only metadata on phone numbers linked to suspected terrorist activities, and did not eavesdrop on the content of calls or e-mails without a court order.