Chinese President Xi Jinping and his Turkish counterpart President Recip Tayyip Erdogan agreed on Saturday to deepen counter-terror cooperation, as the two set aside previous disagreements over China's treatment of a Turkic-speaking Muslim minority.
Hundreds, possibly thousands of Uighur Muslims keen to escape unrest in China's western Xinjiang region, have travelled clandestinely via Southeast Asia to Turkey, where many see themselves as sharing religious and cultural ties.
Beijing says some Uighurs end up fighting alongside militants in Iraq and Syria.
But Ankara vowed last year to keep its doors open to Uighur migrants fleeing what rights activists have called religious persecution in China.
Beijing denies accusations that it restricts the Uighurs' religious freedoms.
Meeting on the sidelines of the G20 Summit in the eastern Chinese city of Hangzhou, Xi told Erdogan he appreciated Turkey stressing that it would not allow its territory to be used for acts that harmed China's security.
China "hopes both sides can achieve even more substantive results in counter-terrorism cooperation", China's state-run Xinhua news agency cited Xi as saying.
Erdogan said the emphasis should be on strengthening their ties.
"Fighting terrorism is a long-term issue, and is also a long-term topic discussed by the G20."
Xinhua also quoted Erdogan as thanking China for its help in maintaining Turkey's security and stability, and that he hoped for greater counter-terrorism cooperation.
Turkey, a NATO member and part of the US-led coalition against terrorist group DAESH, has seen a series of deadly bombings this year blamed on the terrorists.
But it also fears the PYD/YPG in Syria which Turkey considers as PKK’s Syrian branch, will seize a swath of border territory which could enable more attacks on its own soil.
Turkey has been battling PKK, designated as a terror group by Turkey, EU, the US and NATO, for more than 30 years.
Turkey angered China by expressing concern about reports of restrictions on Uighurs worshipping and fasting during the holy month of Ramadan last year, and Turkish protesters have marched on China's embassy and consulate in Turkey over Beijing's treatment of Uighurs.
Officials in Xinjiang have stepped up regulations banning overt signs of religious observance, such as veils or beards.
The two countries have also jousted over Thailand's deportation of Uighur migrants back to China.