The Turkish Foreign Ministry summoned the German ambassador in Ankara on Wednesday to condemn the detention in Germany of two journalists from a pro-government Turkish newspaper, in the latest case of tension between the two Nato allies.
Police searched the private apartments of two journalists, aged 46 and 51, in the western town of Moerfelden-Walldorf on suspicion of dangerous dissemination of personal data, the public prosecutor's office in Darmstadt said.
Electronic storage media and other devices were confiscated, the office said, adding that police had detained the two men but later released them.
"The German ambassador in Turkey [Juergen Schulz] was called to the Turkish Foreign Ministry today for an interview," a source at Germany's Foreign Ministry told Reuters.
Germany is home to the world's largest Turkish diaspora community.
Relations between Berlin and Ankara have suffered in recent years over issues including Germany giving asylum to the followers of cleric Fethullah Gulen, who is living in exile in the US and was blamed by Ankara for a 2016 failed coup.
The Gulen movement has been designated a terrorist organisation in Turkey.
Germany's refusal to extradite military officers Turkey accuses of taking part in the coup attempt, after they claimed asylum, enraged Ankara.
Voting in Turkey's presidential election - in pictures
The Turkish state-owned Anadolu news agency reported that German police had raided the Frankfurt office of the Turkish daily Sabah before detaining the journalists.
The Turkish Foreign Ministry said the journalists had been detained because of their reporting on the Gulen network, after a complaint by one of its members.
The German Interior Ministry was not immediately available to comment.