Turkish officials have denounced German Chancellor Angela Merkel and Martin Schulz, her main opponent in this month's general election, for their anti-Turkish rhetoric during a televised debate.

Ibrahim Kalin, spokesman for the Turkish presidency, said in a tweet Monday that Merkel and her Social Democratic Party rival were seeking to divert attention from urgent issues in their country and in Europe, such as a surge in discrimination and racism.

In Sunday's debate, Schulz said he would seek to end long-running but currently stalled talks on Turkey joining the EU over what he perceived to be Turkish President Recep Tayyip Erdogan's increasingly authoritarian policies.

Germany Election

Merkel, left, and Martin Schulz are seen in a TV debate in Berlin on Sunday. (RTL via AP)

Merkel, who has previously expressed doubts about Turkey ever joining the EU, refused to commit firmly to the move, which would have to be agreed among EU members. She sharply criticized Erdogan's rule, saying: "Turkey is departing from all democratic practices at breakneck speed."

Candidates blasted for 'myopic views'

Relations between the two countries have been tense for some time. Turkey has blamed Germany for harbouring people with alleged links to last year's failed coup against Erdogan as well as outlawed Kurdish militant groups, while Berlin has accused Turkey of backsliding on democratic values. More than 50,000 were arrested in the aftermath of the coup.

Omer Celik, Turkey's chief negotiator for its European Union bid, slammed the candidates for their "careless" tone.

"We do not accept these disrespectful messages against Turkey," he said in a tweet.

Italy EU Turkey

Omer Celik, Turkey's chief negotiator for its European Union bid, slammed the candidates for their 'careless' tone. (Fabio Frustaci/Associated Press)

Turkey's foreign ministry also released a statement criticizing the "myopic views" of politicians and reminding the world of Turkey's role in stemming a migrant crisis from pushing the EU into "a big chaos."

The ministry said populistic campaign politics should not undermine bilateral relations and warned against encouraging xenophobia and Islamophobia.

12 Germans detained in Turkey

One reason Merkel gave for keeping lines of communication open with Turkey was Germany's attempts to secure the release of 12 German citizens being held there for what Berlin considers political reasons.

Last week, for example, two were detained at Antalya Airport.

German Foreign Ministry spokesman Rainer Breul told reporters in Berlin on Monday that one of them was released. The German couple of Turkish descent were detained for alleged links to the network of U.S.-based cleric Fethullah Gulen.

Ankara blames Gulen, a former ally of Erdogan, for last year's coup attempt in Turkey. Gulen denies the claim.

Polls show a double-digit lead for Merkel's conservative bloc over Schulz's centre-left Social Democrats before Germany's Sept. 24 election.