Recep Tayyip Erdogan and Vladimir Putin meet in Turkish capital Ankara.

Ankara and Moscow agree on the territorial integrity of Iraq and Russia, Turkish President Recep Tayyip Erdogan said Thursday.

Erdogan's remarks came after a meeting with his Russian counterpart Vladimir Putin in capital Ankara.

"We have discussed regional issues including Iraq and Syria. We both agree on the territorial integrity of Iraq and Syria," Erdogan told a news conference with Putin.

"As Turkey and Russia, we have reconfirmed our determination to maintain our joint will and close cooperation to find a political solution for the Syrian conflict," he said.

The president also commented on Monday's illegitimate Kurdish independence referendum in northern Iraq, and reiterated that it had "no legitimacy" in terms of Iraqi constitution and international law.

The referendum saw Iraqis in Kurdish Regional Government-controlled areas -- and in a handful of territories disputed between Erbil and Baghdad, including ethnically mixed Kirkuk and Mosul -- vote on whether or not to declare independence.

Official preliminary results revealed that 93 percent of voters backed Kurdish independence, although the vote was widely criticized by the international community.

Along with Iraq’s central government, Turkey, the U.S., Iran, and the UN had spoken out against the poll, warning it would distract from the ongoing fight against Daesh and further destabilize the region.