The Turkish and Russian presidents made the remarks during their meeting in Sochi, where they discussed Syria and agreed to restore trade ties.
Turkish President Recep Tayyip Erdogan and his Russian counterpart Vladimir Putin said they support de-escalation (safe) zones in Syria.
Speaking at a joint news conference on Wednesday after the two leaders met in the Black Sea resort of Sochi, Putin said the idea of creating safe zones has wide support, but further discussions are needed to work out the details of how they would operate.
Erdogan said he believed Putin would play a major role in establishing a ceasefire in Syria.
"Stopping every kind of conflict is the guarantee of political dialogue. And through political dialogue, the sovereignty and the territorial integrity of the country will be ensured," Erdogan said.
The Turkish president stood by calls he has long made to establish safe zones between the towns of Al Rai and Jarabulus in Syria's northern Aleppo province along the Turkish border.
Erdogan also said he hopes that Syria's northwestern Idlib province remains as a no-conflict area.
Putin meanwhile said any proposed safe zones in Syria should become no-fly areas if fighting on the ground stops entirely.
"If there is a de-escalation zone, then planes will not fly there on condition that no military activity emanates from these zones," Putin said.
Erdogan praised efforts by Turkey and Russia to promote a ceasefire in Syria through peace talks in the Kazakh capital Astana between the Assad regime and Syrian opposition.
Unity on chemical attack
Erdogan and Putin agreed that the culprits behind last month's chemical attack in Idlib's Khan Shaykhun district should be punished.
Erdogan said the chemical attack was an attempt to "sabotage" the peace process.
"Nobody should get away with such brutality. We agree with Mr. Putin that those responsible for the killings must be punished," Erdogan said.
"Each attack that takes place during a ceasefire worsens the situation and undermines the efforts made by guarantor states."
Turkey not budging on YPG
Turkey will continue to take measures against threats from its southern borders with Syria and Iraq, Erdogan said in the press conference.
He also reiterated that Turkey considers both Daesh and the YPG as terrorist groups.
"We do not differentiate between terrorist organisations. Daesh, YPG, Al Qaeda are all the same for us," Erdogan said.
"It is our mutual responsibility to scrape away their roots," he said.
They YPG is the armed wing of the PYD, a Syrian affiliate of the PKK, which the Turkey, the US and EU agree is a terrorist organisation.
Erdogan has repeatedly criticised the United States for its support of the YPG, which Washington sees as a key ally in the fight against Daesh.
Trade ties restored
Russia and Turkey agreed to lift all trade restrictions, except those on exports of Turkish tomatoes into Russia, Erdogan said.
Erdogan, however, added that he wanted Turkish tomatoes to be in Russian markets, and temporary solutions could be found.
According to Russian Deputy Prime Minister Arkady Dvorkovich, Russia agreed to resume grain exports to Turkey within the next few days after resolving issues with Ankara that had been restricting supplies.
Dvorkovich, speaking after Putin held talks with Erdogan, also said that some Russian restrictions on tomato imports from Turkey would remain in place "in some form" for the next three to five years.
Turkey, traditionally the second largest buyer of Russian wheat after Egypt and the top buyer of its sunflower oil, imposed what Moscow regarded as prohibitively high import tariffs in March.
TRT World spoke to Julia Lyubova who had updates from Moscow.