By Humeyra Pamuk and Suleiman Al-Khalidi
ISTANBUL/BEIRUT (Reuters) - Kurdish fighters in northern Syria accused the Turkish army of shelling their positions on Monday, highlighting the precarious path Ankara is treading as it simultaneously battles Islamic State in Syria and Kurdish insurgents in Iraq.
Long a reluctant member of the U.S.-led coalition against Islamic State, Turkey last week made a dramatic turnaround by granting the alliance access to its air bases and bombarding targets in Syria linked to the jihadist movement.
The NATO member also launched a second night of air strikes on Kurdish insurgent camps in Iraq on Sunday, part of what a senior government official described as a "full-fledged battle against all terrorist organizations".
The renewed military campaign against the Kurdistan Workers Party (PKK), which has waged a three-decade insurgency against the Turkish state partly from camps in northern Iraq, has raised suspicions that Turkey's real agenda is checking Kurdish territorial ambitions rather than fighting Islamic State.
Ankara is concerned that the success in northern Syria of the Kurdish YPG militia, which has pushed back Islamic State with the help of U.S.-led air strikes, will stoke separatist sentiment among its own Kurds and embolden the PKK.
Turkey's Kurds say that by reviving open conflict with the PKK, President Tayyip Erdogan is also seeking to undermine support for the pro-Kurdish opposition ahead of a possible early election and stoke up nationalist sentiment.
In a statement only likely to deepen Kurdish suspicions, the YPG said that the Turkish army had shelled its positions in a village on the outskirts of the Islamic State-held border town of Jarablus and urged Ankara to halt attacks on its forces.
Several tank rounds from across the border hit its positions and the Turkish army was targeting them instead of the "terrorists", the YPG statement said.
A senior Turkish official confirmed that the Turkish army had shot back after it came under fire from across the border late on Sunday, but said it was unclear which group was involved and stressed that the YPG was not a target.
"The ongoing military operation seeks to neutralize imminent threats to Turkey's national security and continues to target Islamic State in Syria and the PKK in Iraq," the official said, adding that Ankara was investigating.
"The PYD (the political wing of the YPG), along with others, remains outside the scope of the current military effort."
The YPG made further gains against Islamic State in northern Syria on Monday, capturing a town near the Euphrates River after a month-long offensive aimed at cutting their supply lines, the Syrian Observatory for Human Rights, which monitors the conflict, and YPG spokesman Redur Xelil said.
The PYD has emerged as the only notable partner so far on the ground for the U.S.-led alliance as it fights Islamic State in northern Syria.
But the Kurdish group has links to the PKK, which is considered a terrorist organization by Turkey, the European Union and the United States. The two share not only ideology but fighters, with the PKK drawing Syrian Kurdish fighters to its camps in northern Iraq and Turkish Kurds among the PYD ranks.
That has made for an uneasy compromise between Washington and Ankara.
Turkish Prime Minister Ahmet Davutoglu was quoted on Monday as saying the PYD could "have a place in the new Syria" if it did not disturb Turkey, cut all relations with the administration of Syrian President Bashar al-Assad and cooperated with opposition forces.
Washington has reiterated that it labels the PKK as a terrorist organization and stressed that it respects Turkey's right to take action against the militant group.
Erdogan said last Friday that Turkey's operations against Islamist, Kurdish and ultra-leftist militants would continue and warned that all "terrorist" groups must lay down their weapons or face the consequences.
The moves against the PKK come despite negotiations with the militant group launched by Ankara in 2012 to end an insurgency that has killed 40,000 people since 1984. The PKK has said the actions have rendered the peace process meaningless.
Turkish security forces have rounded up 900 suspected members of Islamic State, Kurdish militant sympathizers and leftist militants in recent days, the government official said. Local media reports said the vast majority were Kurdish and leftists, rather than members of Islamic State.
The arrests have at times been violent. A police officer was killed in Istanbul's volatile Gazi district on Sunday, the third day of violence there following the death of a leftist activist during police raids.
Some 500 police swept through the Haci Bayram district of Ankara on Monday and detained 15 Islamic State suspects, 11 of them foreign, the pro-government Yeni Safak daily said.
Operations also took place in the southeastern city of Adiyaman, where 19 people with alleged links to the PKK were detained, it reported.
"The operations continue in a number of locations across Turkey. As of this morning, 900 people are under detention with suspected links to Islamic State, the PKK and (ultra-leftist) DHKP-C," the government official said.
"We are in a full-fledged battle against all terrorist organizations."
(Additional reporting by Orhan Coskun in Ankara and Ayla Jean Yackley in Istanbul; Writing by Nick Tattersall; Editing by Sonya Hepinstall)