Anger over the claims of widespread spying by the NSA on its European allies overshadowed an EU summit held in Brussels on Thursday and Friday.
EU leaders said the allegations had raised "deep concerns" among Europeans and could affect the cooperation needed for effective intelligence gathering.
"A lack of trust could prejudice the necessary cooperation in the field," the leaders said in a joint statement issued at the conclusion of the European Council meeting.
Germany and France intend to seek talks with the United States "with the aim of finding before the end of the year an understanding on mutual relations in that field," the EU leaders' statement said. Other nations are welcome to join these talks, it noted.
Merkel said the assertions that the U.S. National Security Agency spied on her and other world leaders had "severely shaken" relationships between Europe and the United States, and that trust would have to be rebuilt.
Spanish Prime Minister Mariano Rajoy announced Friday that Madrid had summoned U.S. Ambassador James Costos over the matter, a day after Germany summoned the U.S. envoy to Berlin over its concerns.
The German spying allegation came in the same week that the French daily newspaper Le Monde reported claims that the NSA intercepted more than 70 million phone calls in France over a 30-day period.
French President Francois Hollande said Friday there is an "ongoing dialog" with the United States over its past actions, but the priority is establishing a "code of conduct" for the present and future.