By Tom Perry and Sylvia Westall

BEIRUT (Reuters) - Islamic State fighters have launched simultaneous attacks against Syrian government and Kurdish militia forces, moving back onto the offensive after losing ground in recent days to Kurdish-led forces near the capital of their "caliphate."

Islamic State sought to retake the initiative with incursions into the Kurdish-held town of Kobani at the Turkish border and government-held areas of Hasaka city in the northeast.

In a separate offensive in the multi-sided Syrian civil war, an alliance of rebels in the south of the country also launched an attack with the aim of driving government forces from the city of Deraa.

The attacks by Islamic State follow a rapid advance by Kurdish-led forces deep into the hardline group's territory, to within 50 km (30 miles) of its de facto capital Raqqa.

The dual assaults on government forces in Hasaka and Deraa, both provincial capitals, are a test of Assad's resolve to hold out in remote outposts beyond the western part of the country that is seen as the top priority for his survival.

The United States and European and Arab allies have been bombing Islamic State since last year to try to defeat a group that a year ago proclaimed a caliphate to rule over all Muslims from territory in Syria and Iraq.

Islamic State advanced rapidly last month, seizing cities in Syria and Iraq. The latest Kurdish advance in Syria has shifted the momentum again, but Islamic State fighters have often adopted a tactic of advancing elsewhere when they lose ground.

The group said it had seized al-Nashwa district and neighboring areas in the southwest of Hasaka, a city divided into zones of government and Kurdish control. Government forces had withdrawn towards the city center, it said in a statement.

Syrian state TV said Islamic State was expelling residents from their homes in al-Nashwa, executing people and detaining them. Many Islamic State fighters had been killed, it said, included a commander identified as a Tunisian.

Story continues

It also said a car bomb had exploded in the southeast of Hasaka.

LAST GOVERNMENT FOOTHOLDS

The Syrian Observatory for Human Rights, which tracks the war, said Islamic State had seized two districts from government control.

Government-held parts of Hasaka are one of President Bashar al-Assad's last footholds in the northeast region bordering Iraq and Turkey, territory mainly run by Kurds since Syria's conflict erupted in 2011.

The Islamic State attack on Kobani, also known as Ayn al-Arab, began with at least one car bomb in an area near the border crossing with Turkey, Kurdish officials and the Observatory said. Islamic State fighters were battling Kurdish forces in the town itself.

Kobani was the site of one of the biggest battles against Islamic State last year. The Kurdish forces, known as the YPG, drove the Islamic militants back from Kobani with the help of U.S. air strikes, after four months of fighting and siege.

YPG spokesman Redur Xelil cited witness accounts and "preliminary information" that Thursday's attackers had entered from Turkey but the matter was still not clear.

He said they entered the town in five cars, flying the flag of the Western-backed Free Syrian Army movement, which has fought alongside the YPG against Islamic State.

"They opened fire randomly on everyone they found," he told Reuters. The Observatory said the attackers also wore YPG uniforms. He said Kurdish fighters killed 30 of the attackers. Pictures posted on social media showed at least one dead man in uniform who was said to be an Islamic State fighter.

The Observatory said least 35 people, most of them civilians, were killed in the attacks, as well as 20 or more Kurdish civilians in a village south of Kobani. A YPG Facebook page said at least 15 Islamic State fighters had been killed.

A doctor in the town, Welat Omer, said 15 people had been killed and 70 wounded, many of them seriously. Some had lost limbs and some of the wounded had been taken to Turkey.

Around 50 people fled to the Mursitpinar border gate after the attack, seeking to enter Turkey, local witnesses said. Syrian state TV said the attackers had entered Kobani from Turkey - a claim denied by the Turkish government.

AIR STRIKES

U.S.-led forces carried out air strikes on Thursday against Islamic State in Hasaka and near the town of Tel Abyad, further west along the border with Turkey.

A Syrian official, speaking on condition of anonymity because he was not authorized to speak to the media, said Islamic State appeared to be trying to divert enemy forces putting pressure on Raqqa: "I believe this is why they moved to Hasaka - because they felt great danger from the situation in Raqqa."

The Kurdish forces say they currently have no plan to march on Raqqa city.

In Syria's south, rebels launched an assault to capture Deraa, which, if it falls, would be the third provincial capital lost by Assad in the four-year-long war, after Raqqa and Idlib, which is held by another rebel alliance.

The Syrian government has lost ground since March in the northwest, the south and the center, where Palmyra fell to Islamic State last month.

Assad's control is now mainly confined to the major population centers of western Syria, where he has sought to tighten his grip with the help of Lebanon's Hezbollah Shi'ite militia, his main allies.

An alliance of rebel groups known as the "Southern Front", which profess a secular vision for Syria, said its Deraa offensive had begun at dawn. The al Qaeda-linked Nusra Front also has a presence in the south.

The violence briefly spilled over into Jordan, where a stray mortar bomb killed a market vendor and wounded several others.

"If the battle takes time, we are prepared. We have begun the preparatory shelling but we cannot assess the situation right now," said Issam al-Rayyes, spokesman for the Southern Front.

Khaled al-Hanous, governor of Deraa province, told state TV the insurgents had launched "a real war with intensified shelling with various weapons or artillery on citizens in the neighborhoods of the city and on hospitals, schools and infrastructure".

The rebels had not made "one meter of progress", he said.

(Additional reporting by Seyhmus Cakan in Turkey, Laila Bassam in Beirut, Omar Fahmy in Cairo, and Suleiman Al-Khalidi in Amman; Editing by Peter Graff, Kevin Liffey and Sophie Walker)