The Obama administration on Monday moved to contain a diplomatic flare-up with Europe over reports that the United States has spied on some of its closest allies, assuring them that it would respond to concerns while also insisting that American surveillance is a natural part of modern statecraft.

More than two years after a massive breach of State Department cables revealed the inner workings of U.S. diplomacy, reports that the National Security Agency had undertaken a wide-ranging effort to monitor European diplomatic offices seemed — at the very least — to once again force American officials into an embarrassing position.

There was also the potential for broader consequences. French President François Hollande added his voice to a chorus of European leaders who said the revelations threatened transatlantic trade talks. In Berlin, the U.S. ambassador was summoned to the Foreign Ministry, and a spokesman for Chancellor Angela Merkel said she feels “alienated” by the reported eavesdropping.

“We cannot accept this type of behavior between partners and allies,” Hollande said Monday. “We ask that it stop immediately.”

President Obama, traveling in Tanzania, insisted that there was nothing sinister about the NSA’s methods and that there is “almost no information that is not shared” by the United States and its European allies.

Any intelligence he receives, Obama added, is less important than his personal conversations with European leaders. “I’m the end user of this kind of intelligence, and if I want to know what Chancellor Merkel is thinking, I will call Chancellor Merkel,” he said.

The latest flare-up follows weekend reports in the German magazine Der Spiegel and the British newspaper the Guardian, both of which based the disclosures on documents that appear to have been provided by Edward Snowden, the former NSA contractor whose earlier revelations have caused a firestorm of criticism over U.S. surveillance operations. The reports said the agency had placed listening devices in the European Union’s offices in Washington and New York, monitored phone lines at the E.U. headquarters in Brussels and breached its computer network.

Under domestic law, the U.S. government may conduct surveillance at a diplomatic mission inside the United States by obtaining an order from a special surveillance court or in limited circumstances by obtaining the certification of the attorney general, former senior government lawyers said. Those surveillance targets could include offices at the United Nations and the E.U. mission in Washington.

Still, the latest revelations appear to have laid bare the staggering sweep of the practice, increasing political pressure on European governments to respond. The fury caught some U.S. officials off guard Monday. Secretary of State John F. Kerry said he was taken by surprise in Brunei when the European Union’s foreign policy chief, Catherine Ashton, questioned him about the reports.

Kerry, who had spent the past several days immersed in shuttle diplomacy in the Middle East before arriving Monday morning in Asia, said Ashton “did indeed raise it with me” in a meeting of Asian foreign ministers that both are attending. He said he told Ashton that he did not have “all the facts” and would get back to her.

“Every country in the world that is engaged in international affairs undertakes all kinds of activities to protect its national security,” Kerry said. “All I know is that it is not unusual.”

Despite the diplomatic tempest, former U.S. officials who dealt with the fallout from the disclosure of hundreds of thousands of diplomatic cables by the anti-secrecy group WikiLeaks said the latest NSA revelations probably will be easier to explain to allies.

“We all appreciate the taste of sausage even though we’re not always comfortable with how it’s made,” said P.J. Crowley, who served as the State Department’s top spokesman when WikiLeaks released the cables. “Every country has an intelligence service and uses it to understand the world.”

Tamara Wittes, a former deputy assistant secretary of state who oversaw Middle East policy, said that although the WikiLeaks revelations certainly strained some diplomatic relations, the cables themselves were largely in line with U.S. policy that had been articulated publicly.

“The current situation, on its face, involves more than a breach of confidentiality — that’s a breach of trust,” Wittes said. “That said, governments spy on other governments all the time. So this is a bit like the scene in ‘Casablanca’ where Renault is shocked to find gambling in Rick’s club.”

Under the 1978 Foreign Intelligence Surveillance Act, the government must show that it has probable cause that the target of the surveillance is an agent of a foreign power — such as a diplomat — and that a significant purpose of the collection is to gather foreign intelligence, which could include information on terrorism, trade talks and nuclear proliferation.

But there are also international treaties that the United States has agreed to that govern specific organizations, diplomats and buildings. The 1947 U.N. Headquarters Agreement gives special protection to the United Nations and to U.N. diplomats, and the 1961 Vienna Convention on Diplomatic Relations gives special protection to diplomats in general, including in the United States. All of those pacts extend to electronic surveillance, the former officials said. The FISA law trumps the international treaties, some experts said.

The decision to spy on a diplomat inside the United States is politically sensitive, and because it would generally be in violation of an international treaty, it should involve the input of officials at the highest levels, including the national security adviser, said Catherine Lotrionte, a CIA assistant general counsel from 1996 to 2002.

Stewart Baker, a former NSA general counsel, said he was “astonished” that the Europeans “are able to recycle their outrage so frequently with so little embarrassment.”

“They, as far as I know, have no ability and have made no effort to prevent the French from spying on the Germans and vice versa, so it’s hard to see what standing they have to object to other people’s espionage,” he said.

Over the weekend, Ashton said her subordinates had approached U.S. officials in Brussels and Washington to “seek urgent clarification on the veracity of and facts surrounding these allegations.” A spokesman for the European Commission said Monday that President JoséManuel Barroso had ordered a sweep of the commission’s headquarters for any monitoring devices.

U.N. Secretary General Ban Ki-moon, speaking in Geneva, weighed in on the revelations, telling reporters that U.N. member states have an obligation to “protect the inviolability of diplomatic missions. . . . In principle, diplomatic activities should be protected, including information.”

Karen DeYoung in Bandar Seri Begawan, Brunei, Ernesto Londoño in Washington and David Nakamura in Dar es Salaam, Tanzania, contributed to this report.