Hasakeh (Syria) (AFP) - In two districts of Syria's Hasakeh city, Kurdish fighters and regime forces rest before returning to battle the Islamic State group, a shared enemy being fought jointly for the first time.

Although the two forces are fighting in different parts of the northeastern city, where control is divided between the Kurds and the government, both are necessary to defeat the jihadists.

"We can't fight all alone in Hasakeh because IS attacked in great numbers," a government soldier said, sheltering from the scorching heat in a house surrounded by sandbags in the Ghweyran district.

The capital of Hasakeh province has been spared much of the violence of Syria's conflict, and control of the city has been shared between Kurdish and regime forces for several years now.

But IS has encroached gradually in the province, and made a series of attempts to enter the city, finally succeeding in an operation that began on June 25.

The jihadists seized several southern neighbourhoods and prompted tens of thousands of residents to flee, forcing Kurdish fighters and regime troops into an unofficial alliance to defend the city.

The joint effort has borne fruit in recent days, with fighters from the Kurdish People's Protection Units (YPG) taking territory south of the city from IS, effectively encircling them.

Inside the city, government troops have also advanced.

According to the Syrian Observatory for Human Rights monitor, army forces and Kurdish fighters have almost totally encircled IS in the southern part of Hasakeh.

- 'Only a bit to go' -

"We've pushed the IS guys out of Ghweyran. There's only a bit left to go," a senior army officer told AFP as he inspected troops in the neighbourhood.

Despite sharing control of the city for several years, never before have the regime and Kurds in Hasakeh have come together to fight IS.

"The Kurds wouldn't have been able to encircle the IS fighters without the weapons we gave them," the officer said.

Story continues

As he spoke, his parched forces passed around a bottle of water as temperatures hit around 40 degrees Celsius (101 Fahrenheit).

Nearby was the carcass of a car bomb, one of many vehicles IS had rigged with explosives or sent into the city with suicide bombers at the wheel in a bid to take territory.

In central Hasakeh, once home to some 300,000 residents, the front line can seem far away, with traffic moving normally and people shopping.

Some 600 metres (yards) away from the army's position, in the Maaruf district, a dozen Kurdish fighters take a break in a school that has been converted into an assembly point.

Officially, they deny receiving aid from the government, but their weapons are Russian-made and closely resemble those the army is using just down the road.

- Chants of 'YPG, YPG!' -

But they make it clear that they share the same enemy as the government.

"For us, there's a single enemy, and that is IS," said one fighter.

"I would never allow those IS savages to violate my land. I will not stand by idly," said 18-year-old Didar, who is armed with an automatic weapon and begins chanting "YPG, YPG!"

On the first floor, members of the Kurdish female fighting units known as the YPJ watch regime soldiers in the distance through a rifle sight as they advance cautiously through trees towards IS positions.

"Our fighters are continuing their advance towards the east of the city to tighten the siege against IS," said Shirine, whose long dark hair is topped with a bandana.

On the wall of the former school, banners of the YPG and YPJ have been hung alongside a painted rendition of the Syrian flag.

In the skies above Hasakeh, warplanes flown by both regime forces and pilots from the US-led coalition against IS can be seen at different times, scouting for targets.

Washington has insisted that the coalition, which began a campaign of air strikes in Syria in September 2014, will not coordinate with President Bashar al-Assad's regime.

But in reality, a YPG officer told AFP on condition of anonymity, "there is coordination on the flights between the Syrian army and the coalition forces."

"They communicate through a Kurdish mediator."