MOSCOW (Sputnik) - Russian President Vladimir Putin in phone talks on Tuesday invited Turkish President Recep Tayyip Erdogan to visit Russia, the Kremlin press service said.

"Putin invited Erdogan to pay a working visit to Russia in the coming days. The invitation was accepted," the press service said in a statement.

Russian President and his Turkish counterpart also discussed the situation in northern Syria and agreed to avoid clashes between the Turkish and Syrian armed forces, the Kremlin said.

"The two leaders continued discussing the situation in Syria, including in the country’s north. They stressed, among other things, the need to avoid conflicts between armed forces of Turkey and the Syrian government," the statement read.

The Presidents reaffirmed their support to the territorial integrity of Syria and continuation of the political settlement process in the conflict-torn country, the Kremlin press service said.

"The presidents of Russia and Turkey reaffirmed their commitment to continuing the process of political settlement in Syria and expressed their intention to facilitate the convening of the Syrian Constitutional Committee under the auspices of the United Nations at the end of October in Geneva," the statement said.

Russian President said during the phone talks that he considers it unacceptable for terrorists guarded by Kurds to take advantage of the current situation in Syria, the Kremlin said.

"The Russian president drew attention to the aggravation of the humanitarian situation in areas along the Syrian-Turkish border. The head of the Russian state also considers it unacceptable that members of terrorist organizations, including Daesh*, which are now guarded by Kurdish militia, take advantage of the current situation," the press service said in a statement.

Putin stressed that the terrorists are already attempting to break free and flee from Syria to neighbouring countries.

The telephone conversation was initiated by the Turkish side, according to the statement.

Earlier, Putin said that Syria should be freed from any foreign military presence and this rule should be applied to all states. The Russian president noted that Russia would withdraw its forces from the Middle Eastern country if the future legitimate Syrian government decides so.

*Daesh (ISIL/ISIS/Islamic State/IS), a terrorist group banned in Russia and a wide number of other countries.