German Chancellor Angela Merkel will meet President Recep Tayyip Erdogan and other Turkish officials for talks focusing on a troubled European Union deal with Turkey to stem the flow of migrants.

Both leaders will also discuss a Turkish request for the extradition of around 40 soldiers, allegedly involved in Turkey's failed coup, who are seeking asylum in Germany.

Merkel's visit to Ankara on Thursday comes as ties between Turkey and Germany are strained.

Turkey frequently accuses Germany of not backing its fight against outlawed Kurdish rebels, and is pressing Germany to reject the soldier's asylum requests.

In Germany, Merkel is under pressure to speak out against curbs on rights and freedoms in Turkey.

Turkey has threatened to scrap the refugee deal over EU demands that it soften its anti-terrorism laws.