Turkey summoned China's ambassador after the embassy suggested on Twitter that it could take action against two Turkish politicians that had criticised Beijing's treatment of its Muslim Uighur community.
A diplomatic storm has erupted in Turkey after two politicians criticised China's treatment of its Muslim Uighur community.
Uighurs are a Muslim and Turkic-speaking minority native to the Xinjiang region in northwest China.
Several NGOs and countries have accused China of persecuting Uighurs, subjecting them to various abuses in camps.
Beijing rejects these accusations and maintains the camps are "professional training centres" against extremism.
Meral Aksener, chairwoman of Turkey's opposition IVI party, and Ankara mayor Mansur Yavas, from the opposition CHP party, joined in the criticism.
Their posts on Twitter made reference to the killing of Uighurs by Chinese forces during an uprising in Baren district in April 1990, describing the events as a "massacre".
The Chinese embassy thentagged Aksener and Yavas in two Twitter posts, defending the country's policies and stating that "the Chinese side reserves its right to a rightful response".
"The Chinese side resolutely opposes and strongly condemns any challenge by any person or power to China's sovereignty and territorial integrity."
The comments were widely interpreted as a threat against the two politicians and caused a social media outrage in Turkey.
A Turkish foreign ministry official confirmed that China's ambassador was summoned on Tuesday, without giving further details.
In recent years, thousands of Uighurs have sought refuge in Turkey because of their shared cultural ties, and communities have repeatedly demonstrated outside the Chinese consulate in Istanbul and the embassy in Ankara.
"We will not forget our brothers in captivity and we will not remain silent in the face of their persecution," Aksener had said on Twitter.
"East Turkistan (the name given by Uighurs to the Xinjiang region) will surely be free one day."
"The Xinjiang Uighur Autonomous Region is inseparable from the territory of China," the embassy retorted in a tweet, adding that the Turkish politicians' statements were wrong.
The Turkish government of President Recep Tayyip Erdoğan has been criticised nationally for remaining silent on the matter and building stronger economic ties with Beijing.