WASHINGTON — Facing lawmakers who suggested U.S. surveillance has gone too far, the national intelligence director on Tuesday defended spying on foreign allies as necessary and said such scrutiny of America’s friends – and vice versa – is commonplace. He also said the collection of phone records that prompted outrage across the Atlantic actually was conducted with the help of European governments.

Top intelligence officials testified that news reports that the National Security Agency had swept up millions of phone records in France, Spain and elsewhere were inaccurate and reflected a misunderstanding of “metadata” that was in fact collected by NATO allies and shared with the United States.

The nation’s post-Sept. 11 surveillance programs are coming under increased criticism at home and abroad, capped by recent revelations that the NSA monitored German Chancellor Angela Merkel’s cellphone and those of up to 34 other world leaders. Those reports relied on documents provided by former NSA analyst Edward Snowden.

Congressional leaders who have been staunch supporters of the NSA programs are now saying it is time for an examination. The White House said Tuesday that President Obama ordered a full review of the programs and was considering changes.

National Intelligence Director James Clapper defended the secret surveillance that sweeps up phone records and emails of millions of Americans as vital to protecting against terrorists.

He played down European allies’ complaints about spying on their leaders, saying the allies do it, too. “That’s a hardy perennial,” Clapper told a House intelligence committee hearing.

He said during his 50 years working in intelligence it was “a basic tenet” to collect, whether by spying on communications or through other sources, confidential information about foreign leaders that reveals “if what they’re saying gels with what’s actually going on.”

Committee Chairman Mike Rogers asked whether allies had conducted the same type of espionage against U.S. leaders. “Absolutely,” Clapper responded.

Asked about collection of foreign phone records, the NSA’s director, Gen. Keith Alexander, testified that the U.S. did not collect European records alone, as has been reported recently and prompting an outcry of criticism across Europe.

Alexander said the U.S. was given data by NATO partners as part of a program to protect military interests. Alexander disputed that the program targeted European citizens, but did not offer specifics.

As for efforts at home, the intelligence leaders defended sweeping up records of U.S. phone calls as necessary to combat terrorism.

The administration vigorously opposes efforts to curtail the internal spying programs that have angered some Americans and Rogers urged lawmakers not to scrap an important investigative tool.