BERLIN — In the latest episode in the diplomatic skirmish between Germany and Turkey, the police in Spain, acting on a request from the Turkish authorities, have arrested a Turkish-German writer on vacation in Spain.

Although the writer, Dogan Akhanli, 60, was released from custody within 24 hours of his arrest on Saturday, he was ordered to remain in Spain pending a decision on Turkey’s request for his extradition, which could take up to 40 days.

The grounds for extradition were murky, and Germany’s foreign ministry said on Monday that it did not expect the request to be honored. But the arrest of Mr. Akhanli, who has long had a stormy relationship with his native country and became a German citizen 16 years ago, triggered outrage in Berlin.

Chancellor Angela Merkel called it “unacceptable,” adding, “We cannot allow international organizations such as Interpol to be misused in this way.”