A widening scandal over US spying on its friends and allies put the fight against terrorism centre stage Friday as EU leaders called for a new understanding with Washington on intelligence gathering.
At the close of a summit overshadowed by the spying row, all 28 EU leaders "stressed that intelligence gathering is a vital element in the fight against terrorism".
They noted "the close relationship between Europe and the USA and the value of that partnership".
But this must "be based on respect and trust," a lack of which "could prejudice the necessary cooperation in the field of intelligence gathering," they said in a statement.
Revelations of US covert surveillance based on leaked documents from former US intelligence contractor Edward Snowden have sparked outrage in the European Union where data protection is a very sensitive issue.
The scandal widened this week with the German chancellery saying it has information that US intelligence is spying on the mobile phone exchanges of Chancellor Angela Merkel, prompting Berlin to summon its US ambassador over the issue.
"Spying between friends, that's just not done," Merkel said.
In another potential embarrassment for Washington, Spanish Prime Minister Mariano Rajoy said Friday he would call in the US ambassador to Madrid to explain reports of American spying on the country.
"We do not have evidence that Spain has been spied on ... but we are calling in the ambassador to get information," Rajoy said at a closing press conference.
France and Germany are to lead efforts to fix new ground rules with Washington on intelligence gathering by the end of this year.
Snowden's leaks 'make our world more dangerous'
Britain -- which has very close intelligence links with the United States formed over many years -- meanwhile robustly defended its secret service.
"Every year (they) ... help to keep our people safe, help to keep people safe in other European countries," Prime Minister David Cameron told reporters.
He said the EU leaders statement was "good and sensible" and that he was struck by how much his colleagues do not want "a breach in the relationship" with the United States.
Cameron attacked Snowden, who is seen by some as a hero, as someone who "is going to make our world more dangerous".
Snowden and the newspapers which publish the documents "make it a lot more difficult to keep our people safe," he said.
The terrorist attack on a Kenyan shopping mall earlier this month only highlighted the dangers, he added.
Belgian Prime Minister Elio di Rupo said finding a balance was essential.
"The objective must remain the same -- to fight against terrorism but also respect privacy," Di Rupo said.
"Everyone can understand the need for exceptional measures given the danger of terrorism ... but we are not in the position where we should spy on each other."
For its part, the White House has stuck to the line it cannot comment on intelligence activities.
But on Thursday, an advisor to President Obama acknowledged that US surveillance had caused problems with its allies.
Recent disclosures "have created significant challenges in our relationships with some of our closest foreign partners," Lisa Monaco, assistant to the president on homeland security and counterterrorism, wrote in USA Today.
"The president has directed us to review our surveillance capabilities, including with respect to our foreign partners," Monaco added.
At the same time, the Washington Post reported that the United States was warning some foreign intelligence services that documents obtained by Snowden contain details of how they cooperate secretly with Washington.
Citing unnamed US administration officials, it said some of the tens of thousands of documents contain sensitive material about programmes against countries such as Iran, Russia and China.
The scandal has sparked widespread anger in Europe, with some senior EU officials suggesting talks on a massive EU-US free-trade agreement could be suspended.
Merkel, however, cautioned against such a move, arguing: "When you leave the room you have to work out how to get back."
Di Rupo warned too that there was "no reason ... to create more problems than there already are."
The European Parliament has already asked for a key EU-US bank data-sharing deal aimed at fighting terrorism to be suspended.