WASHINGTON (Reuters) - The head of the National Security Agency defended his beleaguered organization on Tuesday, saying it acts within the law to stop militant attacks and calling reports that the NSA collected data on millions of phone calls in Europe false.

Army General Keith Alexander, testifying with other U.S. spy chiefs before the House of Representatives Intelligence committee, sought to defuse a growing controversy over reports of NSA snooping on citizens and leaders of major U.S. allies.

The hearing took place as Congress is weighing new legislative proposals that could limit some of the NSA's more expansive electronic intelligence collection programs.

"It is much more important for this country that we defend this nation and take the beatings than it is to give up a program that would result in this nation being attacked," Alexander said, referring to criticism of his agency.

On Monday, that criticism broadened to include Senator Dianne Feinstein, chairman of the Senate's intelligence panel and a long-time ally of U.S. spy agencies.

The White House has moved to limit some NSA programs, including one that monitored the cellphone of German Chancellor Angela Merkel. Reuters reported on Tuesday that U.S. President Barack Obama has also curtailed NSA monitoring of United Nations headquarters in New York.

But under sympathetic questioning from the committee chairman, Representative Mike Rogers, Alexander said reports of NSA spying in Europe were exaggerated. He called media reports in France, Spain and Italy that the NSA collected data on tens of millions of phone calls in those countries "completely false."

Some of the data referenced in documents leaked by former NSA contractor Edward Snowden were collected not just by the NSA itself but was also "provided to NSA by foreign partners," he said. "This is not information that we collected on European citizens. It represents information that we and our NATO allies have collected in defense of our countries and in support of military operations."

The U.S. intelligence officials also sought to turn the tables, saying that Europeans also spy on the United States.

Director of National Intelligence James Clapper replied "absolutely" when Rogers asked him whether allies conducted espionage against the United States and its leaders.

Rogers got into a heated debate with Democratic Representative Adam Schiff, an NSA critic, who questioned Clapper about whether the intelligence community thought eavesdropping on allied leaders was important enough to have informed the committee.

Rogers, a former FBI agent, told Schiff, a former federal prosecutor, that all committee members could wade through "mounds" of information provided by intelligence agencies.

Schiff said it would be "disingenuous … to suggest that we have information if we don't have it."

To which Rogers shot back: "To say that this committee is somehow in the dark on intelligence activities is simply not accurate."

Feinstein said on Monday that her Senate panel "was not satisfactorily informed" of some NSA activities.

EUROPEAN ANGER

The intelligence chiefs appeared against a backdrop of angry accusations by European allies that the United States spies on their leaders and citizens, accusations prompted by highly classified documents that Snowden leaked to media organizations.

Alexander, however, described Snowden as a website administrator without access to the most secret of files.

The loudest protests have come from Germany over reports of U.S. monitoring of Merkel's communications. A German media report last week said the United States monitored her mobile phone. The White House did not deny the report but has said no such surveillance is taking place now.

More than any previous disclosures from the Snowden documents, the reports of spying on close U.S. allies have forced the White House to promise reforms and even acknowledge that America's electronic surveillance may have gone too far.

Clapper told the hearing that one of the most fundamental missions of U.S. intelligence agencies is to understand foreign leaders' intentions. He spoke broadly and historically and did not refer to any specific leaders.

"Leadership intentions are an important dimension of the landscape out there for all policymakers," he said.

The hearing took place as multiple reviews of NSA programs are under way or being launched by the White House and Congress.

The top Republican in Congress, House Speaker John Boehner, told reporters there should be a review of NSA spying on allied leaders. He said the United States must balance its obligations to allies with its responsibility to keep Americans safe.

Two lawmakers from different political parties introduced legislation to end the government's "dragnet collection" of information. The bill also calls for greater oversight, transparency and accountability for domestic surveillance.

Democratic Senator Patrick Leahy and Republican Representative James Sensenbrenner, the primary authors of the USA Patriot Act implemented after the September 11, 2001, attacks, to improve the government's ability to protect its citizens, now want to make sure information gathering does not go too far.

"No one underestimates the threat this country continues to face, and we can all agree that the intelligence community should be given necessary and appropriate tools to help keep us safe," said Leahy, chairman of the Senate Judiciary Committee. "But we should also agree that there must be reasonable limits on the surveillance powers we give to the government."

Feinstein joined the ranks of critics on Monday, expressing outrage at American intelligence collection on allies, and pique that her committee was not informed.

"With respect to NSA collection of intelligence on leaders of U.S. allies - including France, Spain, Mexico and Germany -let me state unequivocally: I am totally opposed," said Feinstein, who has been a staunch defender of some of the NSA programs leaked by Snowden.

The White House is conducting reviews of intelligence programs prompted by disclosures from Snowden and said it has already made some unspecified changes. Snowden is living in Russia, out of reach of U.S. attempts to arrest him.

Alexander said Snowden's job was "to administer a website that brought information into NSA Hawaii for the people in NSA Hawaii" and he did not have access to Foreign Intelligence Surveillance Act data or some of the agency's most sensitive information.

Snowden had "tremendous access" to information about "core capabilities" for NSA product reporting and he took a lot of that, Alexander said. "It wasn't that he had knowledge, because he clearly didn't understand things about how these tools actually operate."