WASHINGTON — The head of the National Security Agency on Tuesday vigorously challenged recent reports that the United States had been gathering the phone records of millions of Europeans, saying that the records had in fact been turned over by allied spy services.

“This is not information we collected on European citizens,” said the agency’s director, Gen. Keith B. Alexander. “It represents information that we and our NATO allies have collected in defense of our countries and in support of military operations.”

General Alexander said that phone data was generally collected outside Europe.

The Wall Street Journal reported on its website on Tuesday that intelligence services in France and Spain had collected phone records of their citizens and turned them over to the N.S.A. as part of an arrangement to mitigate threats against American and allied troops and civilians.

But General Alexander and James R. Clapper Jr., director of national intelligence, broadly defended the N.S.A.'s practice of spying on foreign leaders. Such espionage, they said, was a basic pillar of American intelligence operations that had gone on for decades.