The surprise attack came before dawn. An Islamic State group militant emerged from underground right into a deserted building being used as a position by U.S.-backed Syrian forces on a front line in Raqqa. He screamed, Allahu akbar, or 'God is great,' and threw a bomb, killing a guard. More militants burst out of the tunnel, raced up to the top floor and killed three fighters, capturing the building and the battling for hours with other fighters from the Syrian Democratic Forces. More than a week after the battle, described to The Associated Press by SDF fighters and commanders, IS militants still hold the building on Raqqa's western side, their snipers face to face with the SDF snipers meters away. While AP visited the site, an airstrike hit the top of the building, yet soon after, an IS sniper there opened fire — a burst of bullets to proclaim that he had survived. Now in its seventh week, the assault to recapture the northern Syrian city of Raqqa from IS militants has ground down into a bloody battle of attrition from street to street, each trying to draw out and weaken the other. Having prepared for months, the militants have put up stiff resistance, using an extensive network of tunnels to strike behind their enemies, deploying land mines and suicide bombers and slowing the SDF advance. 'They are like rats. They pop up from underground and then disappear again,' said one SDF fighter on a frontline on the eastern side of the old city, which has become the focus on the battle. The militants in Raqqa have used civilians as human shields to an even great extent than they did in the Iraqi city od Mosul, said U.S. Army Col. Ryan Dillon, the spokesman for the U.S.-led coalition fighting the Islamic State group. He said they had posted children outside a workshop where they manufacture car bombs to prevent airstrikes. Warplanes did not target the factory, but were able to hit the car bombs later after they drove away from the area where they children were, he said. 'We know this is not going to be an easy fight,' he said. Dillon said the SDF is still making steady advances, but acknowledged a slower pace than the first two weeks of the operation, which saw quick and immediate progress. Several weeks ago, the SDF — which is dominated by Syrian Kurdish forces with a mix of Sunni Arab militias and a Christian faction — made a swift and surprising advance, breaking through the historic wall that surrounds the old center of Raqqa. Since then, the advance has been at a crawl, a few hundred meters. Dillon said the area now held by the militants in the old city is about two kilometers (1.2 miles) across from east to west. The fighting along with U.S. airstrikes have raised fears for the 30,000-50,000 civilians believed to be still trapped in IS-held parts of the city. Since the assault began, 293 civilians have been killed, along with 416 IS fighters and 192 SDF fighters, according to the Syrian Observatory for Human Rights, which monitors the conflict. One Kurdish commander on the eastern front said IS militants try to sneak in among civilians, wearing suicide belts. They also send car bombs to the front line and move between homes through holes in the walls to avoid detection. He said a few days ago his fighters discovered a 6-meter (yard) deep tunnel before the old wall that led to neighborhoods on the outskirts of the city. 'The enemy is always coming to us. We have to be always prepared to attack,' said the commander, who requested to be identified by his nom de guerre Ciya, a traditional practice in the YPG, the Kurdish militia that forms the backbone of the SDF. Minutes later as he spoke, a couple of rounds of mortars hit near a house where his troops have their command center. The militants also exploit the differences in quality among the Kurdish and Arab forces that make up the SDF. The Arab militias, made up of tribal fighters, are less disciplined than the Kurds, who are better trained and more experienced. In one place, IS militants have focused on Arab positions in their counterattacks. At one point they were able to retake the al-Sanaa district in eastern Raqqa. An Arab militia called the Elite Forces had to pull back from their position at an entrance to the old city, a strategic point that had been key to the advances so far. The Elite Forces were 'unable to keep up with IS,' Ciya said. Snipers are deployed from both sides along fragile front lines, with fighters sometimes holding positions only 150 meters (yards) apart. IS militants fire unguided mortars toward SDF positions and often appear behind enemy lines. Civilians have attempted to flee and were caught between IS fire and coalition artillery. 'More than anything, it is a war of attrition. They are making traps everywhere and they want us to come to them,' said Abjar, a field commander with the Syriac Military Council, an Assyrian militia that is part of the SDF. He spoke on condition he also be identified only by one name to protect his identity from militant reprisals. Also unlike Mosul, the battle for Raqqa is complicated by the tension between Turkey and Syria's Kurdish fighters. Turkish troops and allied Syrian fighters have shelled Afrin, a Kurdish area in western Syria. That has raised the possibility that Kurdish fighters at Raqqa could redeploy there, weakening the campaign against IS. Dillon, of the coalition, said the friction 'does cause concern to the coalition because our focus is clearly on Raqqa.' But so far, he said there has been no change in the number of forces.