Dogan Akhanli, who has lived in Germany since 1991, was arrested August 19th while on holiday in Granada in southern Spain, on the basis of an Interpol "red notice" from Turkey, in a case that has further strained German-Turkish relations.
Turkish authorities accuse the 60-year-old writer of "terrorism", his lawyer Gonzalo Boye said.
Berlin protested and a Madrid court freed Akhanli on August 20th but ordered him to stay in Spain and report to the authorities weekly, while Turkey has 40 days to send a formal extradition request.
"How can they consider deporting me to Turkey, a country that is slipping towards fascism, when Spaniards themselves must have learned from history what this means for mankind," he said at a Madrid news conference, referring to Franco dictatorship in Spain from 1939 to 1975.
Germany has dismissed the case against Akhanli as politically motivated, and Chancellor Angela Merkel warned President Recep Tayyip Erdogan's government not to "misuse" Interpol to pursue its critics.
Akhanli said he believed Turkey ordered his arrest because "I express myself out loud, and because I write books about the Armenian genocide and the rights of the Kurds", Turkey's largest ethnic minority group.
He has angered the Turkish government by writing about the World War I-era mass killings and deportation of up to 1.5 million Armenians under the Ottoman empire.
Many historians and western nations, including Germany, consider the events a genocide -- a term forcefully rejected by Turkey.
Turkey acknowledges that large-scale massacres took place but says that they were perpetrated in self-defence against what it calls a Russian-inspired uprising by Armenians.
Akhanli grew up in Istanbul, and was jailed from 1985 to 1987 in the aftermath of a military coup.
He emigrated to Germany in 1991, where he was granted political asylum, and in 2001 he became a German citizen.
On a return trip to Turkey in 2010 Akhanli was again arrested, accused of heading a terrorist organisation and having taken part in a deadly 1989 robbery.
After several months in detention, a court cleared him and he left Turkey, but the ruling was overturned in 2013.
Akhanli argues that the accusations against him are made up.
Any country can issue an Interpol "red notice", roughly equivalent to an international arrest warrant, but extradition by Spain would follow only if Ankara can convince Spanish courts it has a solid case against him.
Boye, Akhanli's lawyer, accused Spanish authorities of granting extraditions too easily.
He said that Madrid extradited three people to Turkey in 2014, three in 2015 and five in 2016.
"The numbers speak for themselves," Boye said.