In the sunlit courtyard of a mosque, overlooked by jagged mountains, dozens of men arrive to offer condolences to the family of Brigadier Hamid Birmous.
The commander with the Iraqi Kurdish forces known as peshmerga was killed in action by an ISIS bomb during the operation to retake the city of Mosul, which began this week. Iraqi security forces continue to fight their way through villages and countryside outside the city.
In the mainly ethnic Kurdish city of Dohuk, most of the men wear Kurdish traditional baggy pants with a wide sash. But there are men in uniform, too, briefly back from the front lines, who say it's been a tough week.
The dead brigadier's nephew, peshmerga Sergeant Hermen Idriss has eyes red from weeping.
"I would need days to talk about his life. He was a hero," he says.
Idriss, too, has been fighting against ISIS. The bomb that killed his uncle was a kind he hadn't seen before.
"ISIS has changed their tactics," he says. "They have changed their landmines, this kind of mine is different from what we have seen before."
Iraq's security forces — an array of different branches, plus paramilitary allies and advisers from the U.S.-led coalition — have been preparing for months for this offensive.
In this particular battle, north of Mosul, the forces were moving into villages where all the civilians fled ISIS long ago.
The Pentagon and Iraq's prime minister say the operations are on track. At the beginning of the week, some Iraqi officials told NPR this phase would take just a week or two. But after a chaotic battle Thursday, Idriss disagrees.
"They are fighting a tough fight, and that means it will take longer," he says.
ISIS has slowed Iraqi advances not with direct fighting, but with dozens of truck and car bombs, networks of mines, mortars, snipers, and suicide attackers.
A commander, a grizzled colonel named Jamal al Amenki, says his forces weren't expecting attacks on this scale.
He says over the past two years, they've at least known where ISIS fighters are, had intelligence about what they've been planning.
"We knew all their tactics. We knew that when we started to attack them, they would also fight us — and we knew where they were."
Now, he guesses the extremists must have been building bombs and booby traps in tunnels, and laying them at night. Until now, the front line had barely moved in two years, so the extremists have had plenty of time.
In a family home in a nearby town, I meet a young soldier named Ismail al Zangana who was wounded in the fighting yesterday.
His leg is bandaged, but he's well enough to sit in the red-and-gold parlor and receive all the relatives who have come to wish him well.
He was in a convoy when an ISIS car rigged with explosives approached. The Iraqi soldiers shot it with a rocket, and he was wounded in the explosion.
"ISIS knows if they lose this area, they will lose all of Mosul," he says.
The line he was behind is only a few miles from the city's outskirts.
He also says ISIS doesn't directly fight to keep these little villages, so they don't actually stop the advances, but these booby traps and suicide attacks do slow security forces down. And they kill.
Copyright 2016 NPR. To see more, visit http://www.npr.org/.