In two districts of Syria's Hasakeh city, Kurdish fighters and regime forces rest before returning to battle the Islamic State (ISIS) 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 ISIS 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 ISIS 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 ISIS, 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 ISIS in the southern part of Hasakeh.
"Only a bit to go"
"We've pushed the ISIS guys out of Ghweyran. There's only a bit left to go," a senior army officer told AFP as he inspected troops in the neighborhood.
Despite sharing control of the city for several years, never before have the regime and Kurds in Hasakeh have come together to fight ISIS.
"The Kurds wouldn't have been able to encircle the ISIS fighters without the weapons we gave them," the officer said.
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 ISIS 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 meters (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.
Covert cooperation with US
But they make it clear that they share the same enemy as the government.
"For us, there's a single enemy, and that is ISIS," said one fighter.
"I would never allow those ISIS 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 ISIS positions.
"Our fighters are continuing their advance towards the east of the city to tighten the siege against ISIS," 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 ISIS 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."
AFP contributed to this report.