NEW DELHI: Turkey’s dual agenda came into full view as artillery positions inside the country fired on Islamic State as well as Kurdish YPG militia targets in the towns of Jarablus and Manbij, Syria.

1500 Turkish-backed Syrian rebels, sources say, are in the Turkish town of Gaziantep waiting to attack.

"The Turkish Armed Forces and the International Coalition Air Forces have launched a military operation aimed at clearing the district of Jarablus of the province of Aleppo from the terrorist organisation Daesh," said a statement from the Turkish prime minister's office, using another term for IS.

State run Anadolu news agency said that the Turkish army began shelling Jarablus at about 04:00 local time. The army had earlier ordered residents in the Karkamis - just across the border from Jarablus - to evacuate after the town was hit by Islamic State mortar fire.

The offensive follows an attack in Gaziantep that killed 50 people. Although Turkey's Prime Minister Binali Yildirim earlier said that the attacker was a child, in a later statement he clarified that the identity of the bomber has not yet been established. A disproportionate number of the people killed were women and children as the attack targeted henna night at a wedding party.

Referring to the Gaziantep attack, the Prime Minister justified the offensive into Syria saying that Turkey would take a more active role in Syria in the next six months to prevent the country from being divided along ethnic lines.

"Daesh should be completely cleansed from our borders and we are ready to do what it takes for that," Foreign Minister Mevlut Cavusoglu added at a news conference in Ankara, using an alternative name for the Islamic State.

The attack in Gaziantep is believed to be the handiwork of the Islamic State, and analysts fear that such attacks will only increase as Turkey becomes more embroiled in the Syrian war. In fact, some accounts suggest that the imminent offensive in Syria may have spurred the suicide bombing in Gaziantep.

Turkey has been hit by a wave of attacks, as it sees an upswing in violence by both the Islamic State as well at Kurdish groups. Recent attacks include, in addition to the attack in Gaziantep, a series of bomb attacks in eastern Turkey, including one on the police headquarters Elazig that was claimed by the Kurdistan Workers' Party (PKK) last Thursday; an attempt by Kurdish fighters to storm a military base in July; a bomb attack on a police vehicle in Istanbul that killed 11 and injured 30 in June; and an attack on Istanbul’s main airport that killed 40 people and was claimed by the Islamic State also in June.

As a response, in addition to bombing IS targets in Syria, Turkey fired at YPG positions north of Manbij, Turkish TV reported. In fact, analysts believe that Istanbul’s backing of a Syrian rebel assault on Jarablus, to be launched from its territory, can also be seen as an attempt to prevent the town falling into the hands of Syrian Kurdish forces.

The Kurds -- who are battling IS in Syria -- have long maintained that Turkey is bombing YPG positions in Syria, a charge the world has taken little notice of.

Turkey views the YPG as an extension of the Kurdistan Workers Party (PKK), and has stepped up its offensive against the Kurdish militias after a two year ceasefire between Turkey and the PKK broke down last summer, following a bombing that killed 32 young Kurdish and left-wing activists in the south-eastern city of Suruc in July.

Ankara in turn suspects the Islamic State’s involvement in the attack, as those targeted were traveling across the border to help rebuild the battered city of Kobane. The PKK accused Turkey of wanting IS fighters to succeed in an attempt to put a stop to Kurdish territorial gains in Syria and Iraq, and responded with a wave of counter attacks that continue today.