Turkish President Recep Tayyip Erdoğan slammed the United States in comments published by local media Sunday and said that Washington should choose between Turkey and the Kurdish Democratic Union Party, or PYD, the Associated Press (AP) reported Monday.

Erdoğan made the comments after U.S. President Barack Obama's envoy Brett McGurk visited the northern Syrian town of Kobani, controlled by the PYD’s military wing Kurdish People's Protection Units (YPG). Ankara considers PYD a terrorist group because it is affiliated to the outlawed Kurdistan Workers' Party, or PKK, which has begun an armed insurgency in Turkey. The PKK is also blacklisted by most of the international community. The YPG, with support from U.S.-led airstrikes, drove back the Islamic State group (ISIS) from the city a year ago, the AP reported

The PYD has been excluded from the new Syria peace talks being arranged by the United Nations in Geneva after Ankara threatened that it would boycott the talks if the political party attended.

McGurk and an American delegation visited Kobani last week and met the members of the YPG.

“He visits Kobani at the time of the Geneva talks and is awarded a plaque by a so-called YPG general?" Erdoğan told reporters, according to Agence France-Presse (AFP), adding: “Is it me who is your partner or the terrorists in Kobani?”

Erdoğan also reportedly asked: “Do you accept the PKK as a terrorist organization? Then why don't you list the PYD and the YPG as a terrorist organizations, too?”

Ankara is concerned that creating an autonomous Kurdish region in Syria may lead to separatist sentiment in the Kurdish people in Turkey.

McGurk said, according to Turkish newspaper Hurriyet Daily News, that his trip was aimed at reviewing the fight against ISIS, which controls large parts of Iraq and Syria. The U.N. has been urging for negotiations between Syrian President Bashar Assad's government and the opposition forces. The Syrian government confirmed last month that it would participate in the talks, which aim to end the five-year civil war in Syria that has killed over 250,000 people and displaced half the population.