ANKARA (Reuters) - Turkish President Tayyip Erdogan warned on Monday that the U.S. withdrawal from Syria must be planned carefully and with the right partners, saying Turkey was the only country “with the power and commitment to perform that task”.

FILE PHOTO: Turkish President Tayyip Erdogan speaks during a joint news conference with his Iranian counterpart Hassan Rouhani (not pictured) after their meeting in Ankara, Turkey, December 20, 2018. REUTERS/Umit Bektas/File Photo

In an op-ed article for the New York Times, a day before he was due to meet U.S. National Security Adviser John Bolton, Erdogan said Turkey was committed to defeating Islamic State and “other terrorist groups” in Syria.

“President Trump made the right call to withdraw from Syria. The United States withdrawal, however, must be planned carefully and performed in cooperation with the right partners to protect the interests of the United States, the international community and the Syrian people,” Erdogan wrote.

“Turkey, which has NATO’s second largest standing army, is the only country with the power and commitment to perform that task.”

On Sunday, Bolton added a new condition to the U.S. withdrawal from Syria, saying Turkey must agree to protect the United States’ Kurdish allies, who are seen as enemies by Ankara.

In recent days, Trump administration officials have applied the brakes, making clear the withdrawal will not happen quickly. But the White House sought to make the case on Monday that Trump had not changed his position on the move.

Islamic State has been ousted from large areas of territory it once controlled in Syria. But Trump’s announcement of a U.S. pullout left many questions open, including whether Kurdish fighters who had been operating in northern Syria alongside U.S. forces would be attacked by their long-time enemy, Turkey.

Erdogan also warned that the international community should avoid making the same mistakes as in Iraq.

“The lesson of Iraq, where this terrorist group (Islamic State) was born, is that premature declarations of victory and the reckless actions they tend to spur create more problems than they solve,” he wrote.

“The first step is to create a stabilization force featuring fighters from all parts of Syrian society. Only a diverse body can serve all Syrian citizens and bring law and order to various parts of the country.”