* German minister seeks information after Guardian reports
* Reports are based on leaks from fugitive Edward Snowden
* Merkel spokesman plays down talk of rift with Britain (Updates with German government reaction, changes dateline)
By Estelle Shirbon and Erik Kirschbaum
LONDON/BERLIN, June 26 (Reuters) - Germany's justice minister has written to two British ministers demanding to know to what extent a British spy agency targeted German citizens in a large-scale data trawling programme that has upset Berlin.
But Chancellor Angela Merkel's spokesman quickly dismissed talk of a rift between Britain and Germany and said he did not expect the issue to come up at a European Union summit this week when Merkel and British Prime Minister David Cameron will meet.
Based on leaks by fugitive former U.S. spy agency contractor Edward Snowden, the Guardian newspaper reported earlier this month that Britain's Government Communication Headquarters (GCHQ) had tapped international telephone and Internet traffic on a massive scale in a programme codenamed "Tempora".
German Justice Minister Sabine Leutheusser-Schnarrenberger wrote to the British justice and interior ministers seeking clarification of the legal basis for Tempora.
"It is... quite understandable that this matter has caused a great deal of concern in Germany," she wrote in the letter, a copy of which was obtained by Reuters. "Questions have been raised concerning the extent to which especially German citizens have been targeted."
Germans are sensitive about government monitoring, having living through the Stasi secret police in communist East Germany and with lingering memories of the Gestapo under the Nazis.
The British justice ministry told Reuters it would respond to the letter "in due course". The Home Office, or interior ministry, said it did not comment on private correspondence.
Merkel's spokesman Steffen Seibert played down the issue at a regular news conference in Berlin on Wednesday.
"We're in contact with the British on this valued path of cooperation and that will certainly continue," he said.
His comments were echoed by the British side.
"We have an excellent and very close relationship with the German government," Cameron's spokesman said. "We can be very clear to everyone ... that all our agencies work within a strict legal and policy framework."
The sharpest German criticism of the Tempora claims has come from the junior partner in Merkel's centre-right coalition, the Free Democrats (FDP), to which the justice minister belongs.
"We and the British are friends. This is not the way friends behave," said one of the FDP leaders, Rainer Bruederle, telling Wednesday's edition of the Nord-West Zeitung that Germany could not accept infringements of its citizens' privacy.
The FDP appears to want to turn the spying revelations into a campaign issue as it struggles to build enough support to clear the five percent hurdle needed to enter the next parliament after Germany's Sept. 22 election.
The Snowden leaks about the practices of the U.S. and British spying agencies caused a global scandal and resulted in multiple diplomatic headaches for both Washington and London.
The Snowden revelations, and in particular the allegation that British spies handed over large amounts of data to their U.S. colleagues, have also stirred lively debate within Britain.
The British government generally refrains from commenting on the work of its security services, but Foreign Secretary William Hague alluded to the Snowden scandal and defended U.S.-British intelligence cooperation in a speech in Los Angeles on Tuesday.
"We should have nothing but pride in the unique and indispensable intelligence-sharing relationship between Britain and the United States," Hague said, according to a copy of his speech circulated by the Foreign Office.
"In recent weeks this has been a subject of some discussion. Let us be clear about it. In both our countries intelligence work takes place within a strong legal framework." (Additional reporting by Stephen Brown in Berlin; Editing by Gareth Jones)