After nearly three months under siege, the northern Iraqi town of Amerli has been celebrating the partial withdrawal of Islamic State militants - and there have been emotional reunions among families separated by the fighting.

"The road is 100% safe," said Ali, as he unfurled a large map. "Here are we," he pointed. "This is Amerli, and Islamic State are still here, here and here," he jabbed with his finger. It all looked uncomfortably close.

Ali is a former officer in Saddam Hussein's army. Now he is a commander in the Badr Brigade, a Shia militia group which is trained and funded by Iran.

Ali is an ethnic Turkoman from Amerli, a besieged Shia town surrounded by Sunni villages.

We set off, following Ali's pickup truck which was packed with fighters wielding guns and rocket-propelled grenades.

Find out more Listen to From Our Own Correspondent for insight and analysis from BBC journalists, correspondents and writers from around the world Broadcast on Radio 4 on Saturdays at 11:30 BST and BBC World Service Listen to the programme Download the programme

The day before, with the help of American air strikes, the militia had punched a hole through the ring of Islamic State (IS) fighters that had encircled the town for nearly three months.

We began driving along a dirt track through the desert, skirting around Amerli to the east.

The idea was to put distance between ourselves and the remnants of IS.

But we could not have advertised our arrival in a more public manner, as our convoy of four little cars churned up a dust cloud that must have been visible for miles around.

How confident was Ali that he knew exactly where the IS were? Very, he said. I was not so sure.

Image copyright AFP Image caption Shia militia celebrating the end of the siege of Amerli

We halted suddenly at a village by the name of Suleiman Beg. Pockmarked buildings and burned out vehicles lined the road. In the distance, thick black smoke was billowing into the sky. Not far off, a shot rang out, and then another.

Ali turned our convoy around and began driving back the way we had come. Then, without explanation, we turned off the track, bumping over the desert towards an abandoned building.

I tried to keep my fear of an IS ambush at bay; to keep the images of beheaded journalists out of my mind.

I focused on the now - what was going on? Had our route been blocked? Or were we lost? Neither seemed like an appealing prospect.

We stopped again. "Follow in our tracks exactly," Ali shouted as he turned his pickup round again.

"Why?" I asked. "Landmines," someone shouted back.

We eventually made it onto a tarmacked road and into Amerli. The people of the town looked like they had been subsisting on pure adrenaline for the past two-and-a-half months.

Media playback is unsupported on your device Media caption Gabriel Gatehouse in Amerli: "Even the grannies fancy a pop at the Islamic State"

They lined the streets in small groups, men and women, young and old alike, waving Shia flags and cheering as our little convoy progressed along the main street into town.

I was desperate to get out of the car and start asking questions: how had they held out against IS while all around them had fallen?

Many of the inhabitants had left town, so who had done the fighting? And what did they have to eat?

But Ali wasn't stopping. We drove on until we arrived at a house on a backstreet.

He jumped out of his pickup, his eyes burning, his movements focused and purposeful. He was looking for his parents.

Ali knocked on the tall metal gate. No answer. He shouted and banged again. He scaled the wall and opened up from the inside, but no one was home. For a terrible moment it seemed as if we might have travelled this dangerous road with Ali only to find tragedy at the end of it.

But there was good news.

Ali found his elderly mother sheltering at the home of a relative. They embraced for the first time in three months.

Mother and son wept, as fear and uncertainty dissolved into tears of relief. Both were healthy and well. Ali bent down and kissed his mother's feet.

The house soon filled up with relatives and neighbours. Two young boys were pushed forward through the crowd. Abdallah and Abdelhadi, aged 10 and 12, stumbled forward. Each was clutching a Kalashnikov rifle.

"My nephews - these are the heroes of the siege," Ali beamed.

At first I was inclined not to take that literally. Surely I thought, they hadn't sent 10-year-olds out to fight against IS, a group so brutal, so fearsome that the Iraqi army, trained and equipped by the Americans at a cost of billions of dollars, had turned and run rather than stand and fight?

But the townspeople of Amerli insisted it was true.

They were under siege, they said, not only by the invading forces of IS, but also by the people of the surrounding Sunni villages. They needed every last fighter.

For the people caught up in this desperate war, the sight of a young child brandishing the planet's most widely used instrument of death has become a thing not of horror but of pride.

How to listen to From Our Own Correspondent:

BBC Radio 4: Saturdays at 11:30

Listen online or download the podcast.

BBC World Service: Short editions Monday-Friday - see World Service programme schedule.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.