National Intelligence Director James Clapper told Congress on Tuesday the U.S. has a history of spying on foreign leaders and suspects those countries are eavesdropping on U.S. officials as well.

Clapper said in his 50 years in the spy business that it's "kind of a basic tenet" for the U.S. to gather intelligence on foreign heads of state.

When asked during a House Intelligence Committee hearing why such information is valuable, Clapper said it was to determine "from an intelligence perspective if what they're saying gels with what's actually going on."

"It's invaluable to us to know where countries are coming from, what their policies are, how that would impact us across a whole range of issues," he said.

Clapper added U.S. spy agencies aren't just targeting leaders but also "what goes on around them and the policies that they convey to their governments."

When asked by committee Chairman Mike Rogers, R-Mich., if this was a new policy, Clapper said it was "one of the first things I learned in intel school in 1963."

Clapper added he was "absolutely" certain that U.S. allies have spied on American leaders and officials.

Outrage has erupted in Europe in recent days over reports that the National Security Agency targeted German Chancellor Angela Merkel and other foreign leaders.

And the Spanish government summoned the U.S. ambassador this week to discuss allegations that the NSA spied on more than 60 million phone calls in the country — in one month alone.

Clapper suggested such outrage was hypocritical, saying it reminds him of the famous line in the 1942 movie "Casablanca" in which the character Captain Louis Renault feigns surprise when he says he's "shocked to find that gambling is going on here."

"You know, it's the same kind of thing," the director said.