The official, James R. Clapper Jr., the director of national intelligence, testified before the House Intelligence Committee that the N.S.A. had kept senior officials in the National Security Council informed of surveillance it was conducting in foreign countries. He did not specifically say whether President Obama was told of these spying efforts, but he appeared to challenge assertions in recent days that the White House had been in the dark about some of the agency's practices.
Mr. Clapper and the agency's director, Gen. Keith Alexander, vigorously rejected suggestions that the agency was a rogue institution, trawling for information on ordinary citizens and leaders of America's closest allies, without the knowledge of its Washington overseers.
Their testimony came amid mounting questions about how the N.S.A. collects information overseas, with Republicans and Democrats calling for a congressional review, lawmakers introducing a bill that would curb its activities, and Mr. Obama poised to impose his own constraints, particularly on monitoring the leaders of friendly nations. At the same time, current and former American intelligence officials say there is a growing sense of anger with the White House for what they see as attempts by the administration to pin the blame for the controversy squarely on them.
General Alexander said news media reports that the N.S.A. had vacuumed up tens of millions of telephone calls in France, Spain and Italy were "completely false." That data, he said, is at least partly collected by the intelligence services of those countries and provided to the N.S.A.
Still, both he and Mr. Clapper said that spying on foreign leaders — even those of allies — was a basic tenet of intelligence tradecraft and had gone on for decades. European countries, Mr. Clapper said, routinely seek to listen in on the conversations of American leaders.
"Some of this reminds me of the classic movie 'Casablanca' — 'My God, there's gambling going on here,' " Mr. Clapper said, twisting the line from the movie uttered by a corrupt French official who feigns outrage at the very activity in which he avidly partakes.
Asked whether the White House knows about the N.S.A.'s intelligence-gathering, including on foreign leaders, Mr. Clapper said, "They can and do." But, he added, "I have to say that that does not extend down to the level of detail. We're talking about a huge enterprise here, with thousands and thousands of individual requirements."
The White House has faced criticism for the N.S.A.'s surveillance practices since the first revelations by a former agency contractor, Edward J. Snowden, in June. But in recent weeks it has struggled to quell a new diplomatic storm over reports that the agency monitored the cellphone of Chancellor Angela Merkel of Germany for more than a decade. White House officials said the president did not know of that surveillance, but that he has told Ms. Merkel that the United States is not monitoring her phone now and would not in the future.
Several current and former American officials said that presidents and their senior national security advisers have long known about which foreign leaders the United States spied on.
"It would be unusual for the White House senior staff not to know the exact source and method of collection," said Michael Allen, a National Security Council official in the George W. Bush administration and a former staff director for the House Intelligence Committee. "That information helps a policy maker assess the reliability of the intelligence."
Mr. Allen, the author of book about intelligence reform called "Blinking Red," said this information often comes to the president during preparation for phone calls or meetings with the foreign leaders.
The White House declined to discuss intelligence policies, pending the completion of a review of intelligence-gathering practices that will be completed in December. But a senior administration official noted that the vast majority of intelligence that made it into Mr. Obama's daily intelligence briefings focused on potential threats, from Al Qaeda plots to Iran's nuclear program.
Mark Mazzetti contributed reporting.