German-Turkish author Dogan Akhanli has been arrested in Spain after Turkey issued an Interpol warrant for the long-time critic of the government of President Recep Tayyip Erdogan.

Spanish police detained Akhanli in the city of Granada on Saturday, Der Spiegel reported.

The arrest was made based on an Interpol “red notice” issued by Ankara, but Spain will only extradite Akhanli to Turkey if the Turkish government can convince Spanish courts it had a real case against him.

The German Foreign Ministry did not immediately return calls regarding the arrest of Akhanli.

In an interview with Der Spiegel, Akhanli's lawyer, Ilias Uyar, described the arrest of the author as part of a "targeted hunt against critics of the Turkish government living abroad in Europe."

Akhanli, who had been detained in the 1980s and 1990s in Turkey for opposition activities, fled Turkey in 1991. He has lived and worked in the German city of Cologne since 1995.

Relations between Turkey and Germany began to deteriorate after a failed coup in Turkey in 2016. Germany has repeatedly criticized Ankara's crackdown on the suspects of involvement in the coup, saying the Turkish government has acted beyond the rule of law.

Turkish President Recep Tayyip Erdogan talks to supporters in Turkey's southwestern city of Denizli on August 19, 2017. (Photo by AP)

In a post-coup crackdown, Turkish authorities have shut some 150 media outlets and jailed around 160 journalists.

In addition to the media crackdown, Turkey has also suspended or dismissed more than 150,000 judges, policemen, teachers, and civil servants and has arrested nearly 50,000 others.

Turkey defends the crackdown and insists that the government in Berlin has failed to properly condemn the coup.

Ankara also accuses Berlin of giving sanctuary to outlawed Kurdish militants and allowing their sympathizers to stage anti-Turkey rallies across Germany.

Berlin, for its part, has toughened its stance toward Ankara following the arrests of 22 German citizens who have been taken into custody in the ensuing crackdown. Nine of those are still in prison, including the recently jailed journalists Deniz Yucel and Mesale Tolu.

On Friday, Erdogan urged the large Turkish diaspora in Germany to vote against Chancellor Angela Merkel in the upcoming German elections, calling the party led by the chancellor "enemies" of Turkey.