At the height of the recent battle for Mosul, Ahmed and his family found themselves on the front line between Iraqi forces and Islamic State (IS) militants. As they tried to escape, a bomb exploded next to them.
Ahmed was pulled alive from the rubble with his only surviving son. But his wife and four other children were killed.
It was months before Ahmed and his son made it to the Khazer refugee camp in northern Iraq. And three more months before he sat down with a counsellor — in the form of Greg Keane, an Australian psychiatrist with the aid agency, Medicins Sans Frontieres (MSF).
The struggle just to survive had consumed Ahmed's days. But he was clearly still suffering from trauma and grief.
"He came into the consultation room with his son. Normally I would ask someone to leave their child outside," Mr Keane says.
"But once I heard the story — as well as being overwhelmed myself and having to contain my feelings — I had to make a decision. I didn't want to separate him from his son.
"He was clearly doing the best he could for his son, and trying to find meaning in his life. Having to make decisions about what he did each day.
"So in that first consultation we focused just on the here and now: what do I do to get up in the morning? What supports can I find in the camp? What sort of social connections can I start developing?"
Psychological scars of war are immense
Ahmed's story is all too common among the thousands who have fled the wars to recapture Mosul in Iraq, and more recently Raqqa in Syria.
The daily effort to find food, work, medical care, and even schooling — while the fighting continues — means that deep-seated trauma and mental health issues are pushed aside.
Only when refugees reach the safety of a camp do many have time to reflect on the violence, death and loss they have experienced.
Yet the psychological and emotional scars of war are immense.
"Usually people with severe mental health illness make up 1 per cent of a lifetime population, and we would have seen all of those," Dr Keane says.
Most of those suffer from traditional mental illnesses such as schizophrenia, psychosis and other conditions that exist regardless of war.
But of those fleeing Mosul, Dr Keane says, "maybe 10 per cent of the population would experience symptoms of moderate to severe mental health disorders", brought on by the affliction of war.
In Arabic, they're known as "majnoun", or crazy.
MSF barely coping with mental health consultations
Indeed, since the war in Mosul began late last year MSF counsellors and psychologists have carried out a record number of mental health consultations — more than 17,000 individual sessions since January this year.
Even now, months after the battle for Mosul was won, the aid agency can barely cope with demand.
"There were so many people, we had to shorten our consultations. We really had to triage," Dr Keane said.
"Thankfully a lot of other NGOs have stepped in and are doing mental health responses for moderate to severe cases, so we're able to respond.
"They have had three years living under Islamic State. And all of the people we see have suffered enormous depravity in that period."
In the last days of the war in Mosul another man, Samir, and his family were sheltering in a house on the front line.
His wife was holding their newborn son when a mortar fell. The wall collapsed on top of her.
As the dust cleared, Samir dug furiously through the bricks and rubble and managed to rescue his wife and sister.
But his son was dead. He was their second child to die in the war. Weeks earlier their daughter starved to death.
Children are often hardest hit
Samir's wife and sister were taken to an MSF-run hospital in west Mosul where all day, every day, patients were brought in.
A little boy with burns to his arms and legs. A little girl with the left leg blown off at the knee. A woman in shock.
One girl tells a hospital worker how she watched her brother die in front of her. Throughout it all mortars continue to explode on the front line.
Dr Keane says children are often hardest hit by the war.
Those who were not killed or wounded were often forced into IS-run schools that used violence or hard-line concepts in their teaching.
Many kids witnessed serious violence or shocking acts committed against those who did not follow IS law or rules.
Some families were so disturbed by IS teaching, they refused to send their children to school at all, meaning many have lost years of education.
How to respond to the needs of kids who have mental health conditions.
Psychologists from outside Iraq brought to deal with trauma
Until MSF set up clinics in the refugee camps in northern Iraq, there were few mental health services to help these children.
"One of MSF's big concerns that we tried to respond to was how do we directly respond to the needs of kids who have mental health conditions as a result of this," Dr Keane says.
"We had to bring psychologists from outside Iraq in order to do that. We have three psychologists at the moment, with child psychology experience, who are working directly with kids coming out of Mosul.
"And we're doing training with Iraqi and Syrian refugees to help kids with symptoms — bed wetting, nightmares, trauma-related responses.
"Our approach was that other organisations can look after mild conditions. We'll focus on kids with actual symptoms, get them back to school, get them functioning again, and try to train people with some experience and help them deliver clinical mental health care for kids."
Many men have also suffered severe trauma, from losing their jobs, income or family roles. Often it has led to mental illness and domestic violence.
"Often it's, 'What role do I have now that I've lost my role as the breadwinner in the family?', or 'How can I protect my family from the dangers real or imagined in the camp?'" Dr Keane said.
"When you're feeling a sense of loss and shame about losing your role, one response is to turn inward and become depressed. Or turn outward and express your loss through verbal or physical violence. And that's mostly intra-family. Gender-based violence is something that does occur.
"We have to find ways of supporting women and children, and also men, in those situations."
Resilience of many Iraqis 'surprising'
Dr Keane has worked as a psychiatrist in both Syria and Iraq and says while refugees in both countries have suffered trauma, the longer history of violence and displacement in Iraq appears to have taken the bigger toll.
"These are communities that have experienced decades of loss, violence, grief," he said.
"What repeated war and violence does, it means you have to invest more energy focusing on day-to-day survival.
"And you can imagine … when you're focusing outwards on survival that things like, you know, family — like communication and healthy family — the emotional health of the family, matters less because you've got to get through the day.
"Everyone suffers and it's awful to compare suffering. But if you've experienced multiple loss or displacements or violence, then your capacity to respond diminishes."
At the same time, he says, the resilience of many Iraqis is surprising.
"People have experienced war in Iraq since 1991. Multiple experiences of displacement. And people have learnt ways of managing that — not always healthy ways — but they've learnt coping strategies," he said.
Despite their loss, for many the trauma of death and loss has now been replaced by the struggles of daily life in a refugee camp where temperatures can reach 50 degrees Celsius in summer and freezing in winter.
Many are preoccupied with how they will find the money to return to their homes in Mosul, whether they can ever rebuild their homes, and where they will eventually live.
"Even after escaping the frontlines, many still fear for their safety and carry little hope in the future," MSF says.