On a main road to central Mosul, just inside the city limits, crowds of people had gathered. Black-clad women stood next to children in vivid winter coats. Old men sat on benches in front of smudged white walls and a young boy on a donkey cart touted for passengers.

Business had been brisk in the past few weeks as people left the city for the safety of refugee camps 30 miles east. But not any more.

The few local people paying to ride were mostly heading back to their homes carrying food that they had just bought from a makeshift market, the first to spring up since this part of the city was retaken from Islamic State extremists by the Iraqi army.

One mile from the front line in the war with Isis, with the cacophony of the conflict raging, Mosul’s residents seem reluctant to leave. So far, only the smaller part of the 73,000 refugees to have fled the fighting have come from the city itself, with most having abandoned the nearby towns and villages that dot the Nineveh plains.

And although the Iraqi military has taken only a slither of Mosul’s outer east, early signs suggest that a projected exodus – as many as one million people – might be far lower than expected when forces push further into the city.

“It’s better to die on our feet, than to live in the dirt of the camps,” said Mohammed Ahmed Mohammed, 50, from the suburb of Gogali, who sat in the soft winter sunshine with four local elders on Friday. “We have no electricity or water. But things will get better day by day.”

Iraqi military trucks roared up and down the road in front of him, and families milled around a nearby aid hub. Locals tinkered under the bonnet of a broken-down Iraqi military truck, and workshops, shuttered for the past six weeks, were slowly being reopened.

Facebook Twitter Pinterest Shoppers at a street market in the Gogali neighbourhood of eastern Mosul. Photograph: Cengiz Yar

“To be honest, we’ve been surprised by the behaviour of the Iraqi military,” said Anwar Taufiq. “They have been good with us so far. They have made the people more comfortable. We feared them before they arrived, but now it just seems normal to have them around.”

The presence of Iraq’s largely Shia military inside Mosul, an almost exclusively Sunni city, had been a contentious issue ahead of the fighting, which began on 17 October.

Tensions between each sect had been high in the three years before Mosul fell to Isis in mid-2014, and many in Mosul feared that the war would be fought along sectarian, rather than nationalistic, lines, with the result being a city and a society that was further divided rather than put back together.

“What comes next, we still don’t know,” said Mujahid Sultan, a pharmacist who reopened for business on Friday. “But for now, there are more reasons to stay than to leave. All I need to convince me is to be able to get more drugs,” he said, pointing at his nearly empty shelves. “Isis was very strict about what we could keep. They were unreasonable and fierce. Even their women carried guns.”

His pharmacy was several hundred yards from the front line and makeshift Iraqi military mechanical outposts dotted the dusty landscape around him. Next door a barbershop had opened its doors and Ahmed Taher Majid, a physics student who abandoned his studies when Isis took Mosul, was putting the finishing touches to Saif Rayan, 14.

“I can be far more creative now,” he said, as he snipped stray hairs from Saif’s acutely angled neckline. “With Isis it was always the same cut. You won’t believe the amount of beards I’ve cut off. For me, business has never been better,” he added with a broad smile. “Why would I leave?”

This part of Gogali is an enclave of the Shabak minority, which the terror group deemed to be Islamic and largely left unmolested. “Except when we smoked,” said Mustafa Tahar, who pointed to his back. “They hit me with a leather strap 20 times and made me pay them $2,000,” he said, inhaling on a cigarette.

Back on the main road, small street stalls had been set up. Freshly butchered meat hung from a rail next to the still dormant donkey cart, and a family had placed tissue papers and fruit on a door they had improvised as a table.

“We couldn’t do this while Isis was here,” said the vendor. “They would kick us out. They controlled every aspect of our lives.”

An Iraqi patrol pulled over, and a soldier beckoned for a boy to approach him before handing over six litres of water to give to his family nearby. “We’re grateful,” the boy said, handing the water to women who lifted their black face covers to take eager mouthfuls.

Facebook Twitter Pinterest Much of the city remains uninhabitable as battles between the retreating Isis and the Iraqi army continue. Photograph: Cengiz Yar

As they did, a volley of shots rang out. Then another, and the crack of rounds passing overhead. Bullets pinged off street signs, and the crowd that had milled expectantly reverted to war mode, scattering for whatever cover they could find. The aid post was about a mile and a half inside the front line and had been cleared by Iraqi forces in the week before. The gunfire was relentless, and came from at least two positions. Two mortars thudded nearby.

Buses that had arrived to evacuate those who wanted to leave reversed and hurried back up the road, away from the chaos. The shattered, uninhabitable remains of the road to safety did not look like beckoning anyone home any time soon.

Before the chaos, Mohammed Ahmed Mohammed had predicted that their tormentors would return before the war was done. “They killed people easily,” he said. “They had no fear of anyone, and they had no real faith. They left in a hurry, but they didn’t really leave at all,” he said pointing to nearby buildings through a treeline.

“But even when they come for us again, we will still stay. These busy streets show people want to live again.” Additional reporting by Salem Rizk