Angela Merkel has attempted to play down the row but MPs from her coalition partner, the Social Democrats (SPD), are threatening a vote in parliament to pull the troops out.

“We will only send our soldiers to countries where we can be certain that we can visit them,” Rainer Arnold, the SPD’s defence spokesman, said.

“The federal government must clarify alternative locations for the German troops immediately.”

Under German law, any military mission abroad must be mandated by parliament. The mandate for the troops in Turkey is due to expire in December.

MPs could trigger a vote before then, and the government is unlikely to win a renewed mandate without the SPD’s votes.

The dispute has been exacerbated by tensions between Turkey and the EU over the post-coup crackdown on Mr Erdogan’s opponents.

Relations with Nato have also been strained by Turkish anger at the US’ reluctance to extradite Fethullah Gülen, the cleric Mr Erdogan accuses of being behind the coup.

There is concern in Nato circles that Mr Erdogan has moved Turkey closer to Russia in recent weeks. His first trip out of Turkey after the failed coup was to St Petersburg, where he was given a warm welcome by President Vladimir Putin.

If the German aircraft are pulled out of Turkey, they could be continue reconnaissance flights against Isil from an alternative base in the region. The most likely locations are thought to be Cyprus or Jordan.

Neither is as well equipped to handle Tornados as Incirlik, and the move would create logistical problems transferring the German reconnaissance to aircraft mounting air strikes out of Turkey.

Diplomatic efforts continue behind the scenes to patch up the row. But an unnamed senior source in the German military told Bild newspaper: “The time window is running out”.