Recep Erdogan has vowed not to give up on Turkey's battle against Isil after 16 Turkish soldiers were killed by Isil fighters in its worst military losses in Syria yet.

The troops were killed in a succession of attacks on Wednesday in the town of al-Bab in northern Syria that included three suicide car bombings.

Despite the battlefield losses, Turkish president Erdogan vowed he would not let up in his battle against Isil.

"Yes, maybe we will have to lay martyrs to rest," he said in a speech in Ankara. "But we are determined to preserve their memory and protect what they left us and continue this struggle."