Islamic State in Iraq and Syria (ISIS) militants launched major attacks in northern Syria on Thursday in a swift counter-offensive after recent battlefield setbacks, storming government-held areas in one mostly Kurdish city and setting off deadly car bombs as they pushed back into a border town they were expelled from earlier this year.

The ISIS offensive was two-pronged and left dozens of people dead or wounded. On one front, ISIS fighters advanced early in the morning into the northeastern city of Hassakeh, long split between Syrian Kurds and government forces, capturing parts of it.

The other push was into the Syrian border town of Kobani, which famously resisted a months-long assault by the Islamic militants before they were driven out in January, and surrounding villages. An activist group said 12 people died in fighting Thursday in Kobani — the first time in six months the ISIS had managed to enter the town along the Syria-Turkey border — and that the militants had detonated three car bombs.

MIDEAST-CRISIS/KOBANI-SYRIA

People mourn the death of a woman, who died from her wounds after she was injured during what activists said was an attack by ISIS fighters in Kobani, Syria on Thursday. (Rodi Said/Reuters)

In the Kobani attack, which was launched from the town's southern and western parts, the ISIS extremists donned Syrian rebel uniforms and carried flags of the mainstream Free Syrian Army to deceive the town's Kurdish defenders, said Redur Khalil, a spokesman for the Kurdish People's Protection Units, or YPG.

Speaking about Hassakeh, Khalil said ISIS militants attacked government-held neighbourhoods on the southern edge of the city, and captured some areas.

Syrian state TV reported intense clashes inside Hassakeh's southern neighbourhood of Nashawi. According to the report, ISIS fighters killed several people they captured in the city, including the head of a military housing institution. It said the militants sustained many casualties, including the commander of the group who is a foreign fighter. An activist group said many people in neighbourhoods engulfed in the fighting fled to safer areas in the city.

ISIS tried to storm the city earlier this month and reached its southern outskirts before facing strong resistance from Syrian government troops who pushed them away.

The Hassakeh and Kobani attacks came just days after YPG fighters and their allies captured the Islamic State stronghold of Tal Abyad on the border with Turkey and the town of Ein Issa to the south. Kurdish fighters have been advancing since January under the cover of airstrikes by the U.S.-led coalition.

But in neighbouring Iraq, government forces and allied Shia militiamen have been slow in retaking IS-held territory. The Iraqis have also suffered occasional losses.

Iraqi troops drove ISIS militants from Saddam Hussein's hometown of Tikrit in April, but lost Ramadi, the capital of Anbar province west of Baghdad, last month.

In June last year, ISIS launched a blitz, capturing large parts of both Syria and Iraq and subsequently declared an Islamic caliphate on the territory it controls. A major IS attack was widely expected during the Muslim holy month of Ramadan, which began last week.

In an audio message Tuesday, ISIS spokesman, Abu Muhammad al-Adnani, urged Sunni Muslims to use the time of piety and dawn-to-dusk fasting during Ramadan to wage jihad and seek martyrdom.

"Attack them everywhere and shake the ground beneath them," he said. It was not possible to verify the recording, but it resembled previous audio statements from the group.

Al-Adnani referred to the recent battlefield setbacks for ISIS, saying the faithful "may lose a battle or battles and may lose towns and areas, but will never be defeated."

Mideast Syria Islamic State

A Syrian Kurdish sniper looks at the rubble in the Syrian city of Ain al-Arab, also known as Kobani, in this January 2015 photo. Turkish officials said Thursday, that ISIS has staged a new attack on the Kurdish town. (Associated Press)

In the Kobani attack, the Britain-based Syrian Observatory for Human Rights, which tracks Syria's war, said three vehicles were detonated in the town. Ghalia Nehme, a commander with the Kurdish Women's Protection Units, told The Associated Press by telephone from inside the town that "a group of fighters deployed in some areas of Kobani."

"We are defending a position now," she added.

Another Kurdish official in Kobani, Idriss Naasan, said the fighting was intense in the morning but became more sporadic by midday. He said the extremists appear to have infiltrated from the villages south of Kobani.

"We hear cracks of gunfire every now and then," Naasan said from inside Kobani around noon. He added that some explosions could still be heard but that it was unclear what those were.

The Observatory said 12 civilians and Kurdish fighters were killed in Kobani on Thursday, and also eight IS extremists.

In Barkh Botan, not far from Kobani, ISIS fighters entered the village also on Thursday morning, opening fire on civilians and killing 20 residents, the Observatory said. Syria's state news agency SANA said 22 people were killed in the shooting, including women and children.