Turkish President Recep Tayyip Erdogan met here separately with his U.S. and Russian counterparts over the weekend on improvement of Ankara's relations with the two countries.
In their first meeting since the recent coup attempt in Turkey, U.S. President Barack Obama condemned the plot and reassured Erdogan that Washington will work to ensure those responsible for the failed coup be brought to justice.
For his part, Erdogan stressed that the United States and Turkey must adopt a common attitude against terrorism, and that there should be no distinction between "good terrorists" and bad ones as all terrorism is bad.
Turkey, a NATO ally of the United States, is a major member of a U.S.-led coalition against the Islamic State group. But the two countries are facing challenges in maintaining robust ties over their divide on Syria policies.
In addition, Turkey-U.S. relations suffered another twist after Ankara expressed discontent over a lack of support from Washington in the wake of the failed coup, particularly the extradition of cleric Fethullah Gulen, whom Turkey accuses of orchestrating the bloody attempt from Pennsylvania.
Prior to his Sunday meeting with Obama, Erdogan held talks with Russian President Vladimir Putin on Saturday night, in which Putin said Russia is happy to see that political life in Turkey is coming back to normal.
In an English transcript of the meeting published on the Kremlin's website, Putin was quoted as saying that a great deal has to be done to restore full-scale bilateral cooperation in all areas.
The two sides agreed to form a joint investment fund, and agreed that sometime in October or November, they will have a list of projects and allocate a credit line to begin work, said Russian Economic Development Minister Alexei Ulyukayev, who witnessed the meeting.
Relations between Russia and Turkey were severely strained when Turkey downed a Russian warplane along the Syrian border in November 2015. The icy ties began to thaw in June when Erdogan wrote a letter to Putin to express his deep sorrow over the jet incident.
The three leaders are in the eastern Chinese city of Hangzhou for the 11th summit of the Group of 20 major economies.