Image caption Shams Hussaini and Francis Amos

Francis Amos has wide eyes, round cheeks and a bright smile that reveals a solitary front tooth. He is eight months old and is better at making friends than his dad.

On a warm Saturday afternoon, my son and I swam in a hotel pool in Batam, Indonesia. The resort overlooked the sea; the skyscrapers of Singapore, about 10 miles away, lined the sky blue horizon.

At the end of the pool, a young man with black hair noticed my son's solitary tooth. He shook his hand and smiled. "Where are you from?" he asked.

"He's from England," I replied. "And you?"

"Afghanistan," he said. "I'm a refugee."

Then, as the sun dipped and the sky turned orange, the refugee told me his story. It involved death threats, a Taliban hijacking, a mystery saviour and years of detention.

Lots of refugees have similar stories - or far worse. But this is his. And it's here because of a chance meeting in an Indonesian pool.

Shams Hussaini (also known as Erfan) is 21 and grew up in Sang-e-Masha, a highland town overlooked by the Hindu Kush mountains.

He has two younger brothers and a younger sister, and comes from an ordinary, poor family. His father made shoes and farmed the small plot of land by their mud-and-stone house.

Shams is too young to remember life before the US-led invasion of Afghanistan in 2001, but he knows what it was like. The school was closed, he says. People did not have access to education.

Shams is a Hazara, the third-biggest ethnic group in Afghanistan. The Hazaras are Shia Muslims, look different to other Afghans, and have suffered decades of persecution, not least from the Taliban.

So after 2001, things improved. They could barely get worse.

"Hazara people are supporters of education," says Shams. "They are supporters of knowledge and light. People started going to school, people started going to university."

They taught English at Shams' school, but only one hour a week. So, aged 12 and encouraged by his uncle and other relatives, he went to a private centre. When he finished the advanced class, aged 15, the director offered him a job.

The role involved teaching basic classes and travelling to the capital, Kabul, to pick up materials - books, paper and so on. The money wasn't great but Shams needed to earn. His parents had died, leaving him, a teenager, as head of the family.

"When I looked at my younger brothers and sister, I thought I must do something to change their lives," he says. "I had to do everything in my ability to bring a little positive change."

On 10 December 2014, Shams left his house and took a bus to Kabul to pick up materials for his English centre. He hasn't seen his family since.

Image copyright Shams Hussaini Image caption Shams at his English learning centre in Afghanistan

The Taliban may have been ousted in 2001, but they never went away. In Sang-e-Masha, they targeted the English school's staff and students.

"For them, English is the language of infidels," says Shams.

The school would receive threatening letters, both from the Taliban and local mullahs. Some mullahs would come from the nearby masjid (mosque) to argue.

"This is not an English learning centre," they would say. "This is a place for misleading the people."

For the mullahs, the sin of teaching English was compounded by teaching boys and girls under the same roof. They bullied Shams - and his family - but he was undeterred.

"We felt scared, but the hunger to help people who lived in illiteracy for decades was higher than the intimidation," he says.

And so, on that cold Wednesday in December, he boarded the bus to Kabul.

It was the third time Shams had gone to Kabul since taking the job and every time, he was scared.

The capital is about 275km (170 miles) from Shams' home and passes through Qarabagh, a place Shams calls the Slaughterhouse.

"The Taliban have killed and kidnapped hundreds and thousands of Hazaras on that highway," he says.

After three hours, the bus reached Qarabagh, and Shams' worst fears were realised. Two Taliban, armed with guns, stopped the bus. They ordered Shams off.

Once outside, the Taliban slapped Shams and yelled in his face. Shams didn't speak their language, Pashto, but the bus driver was able to translate, fearfully and frantically.

"Where is the English teacher?" the Taliban demanded, hands on their guns, eyes boring into him. "Are you the English teacher?"

Image copyright Shams Hussaini Image caption Shams teaching English in Indonesia

Each time Shams denied it, he got slapped. He shook with fear. Tears rolled down his cheeks. Eventually, he became speechless. He was convinced he was about to die.

"The fear conquered all parts of my body," he says.

Then a woman left her seat, walked off the bus, and saved his life.

"Stop," she said, herself crying. "He's not the person you're searching for. He is my son."

Shams did not know the woman, but he did not say anything. The Taliban looked at Shams. He was 15, small, and seemed an unlikely teacher. Eventually, they let him - and the bus - on their way.

Shams had survived. But there was no celebration or near-miss euphoria. "I felt shattered on the inside," he says.

So, when he reached Kabul, he made a decision. He was not going back to the Slaughterhouse, and he was not going back to Sang-e-Masha.

In a Kabul motel, Shams spoke to a driver who often took people from Shams' district to the capital. Shams' story was common, the driver said: many people reached Kabul and never went back.

Shams said he wanted to escape, so the driver found a smuggler who could help. The smuggler said he could send Shams to Indonesia, via India and Malaysia.

Once in Jakarta, the smuggler said, Shams could register with the UNHCR, the UN's Refugee Agency. Shams did not know Indonesia - he had never left Afghanistan - but anything was better than home.

He phoned his uncle (a small-scale farmer), who agreed to pay the smuggler $5,000 in instalments, and waited a week. Then, with his new passport in hand, he flew to Delhi then Kuala Lumpur. From there, he went to the coast to sail overnight to Indonesia.

Compared to some Afghan refugees, it was a quick escape. Those who flee to Europe, for example, often go overland, crossing thousands of miles in the backs of lorries. But Shams' journey - though quicker - was not easy or safe.

When he reached the Malaysian coast, he expected a ferry. Instead he boarded a wooden boat, overcrowded with families, young couples and teenage boys. The sea was rough, the sky was dark, and, after an hour, it started to rain.

Water crashed over the side of the boat. For the second time in a month, Shams thought he was going to die, this time in the Strait of Malacca.

Shams' stop-off points in Indonesia

"It was not supposed to be the place to die," he says. "I survived war in Afghanistan, the Taliban, and now I'm going to sink in the water?

"Negative thoughts were coming into my head. What would happen to my family? What would happen to my dreams? And these thoughts were coming into the heads of other people, too.

"I looked at their faces - it was obvious. They were all in a terrible state of fear."

Somehow they stayed afloat. They reached Medan, Indonesia, and drove to Jakarta, 1,900km (1,200 miles) away. There were six passengers in the car, and they were only allowed out at night - even if they needed the toilet.

After three days without food, and barely any water, they reached the capital. Shams found the UNHCR office and walked in. This, he thought, was the start of a new life.

It was. But not the way he imagined.

Shams thought the UNHCR would listen to his story and offer him a place to stay. Instead, they registered him and asked him to leave the office.

"They said many people are like you - leave your number, go outside, talk to your friends," he remembers. "But I had no friends. I knew no-one in Indonesia."

After two nights on the street he met some Hazara boys from Afghanistan, hanging round near the UNHCR. They told him there were detention centres near Jakarta but they were full. Instead, they said, he should go to Manado.

The city was a three-hour flight from Jakarta, but the detention centre had space, the Hazara boys said. They also knew a woman who could arrange the flight.

Shams didn't want to be locked up - who would? - but he had no alternative. The streets of Jakarta were bleak - no food; no water; no hope.

He didn't have enough money for the flight, but he begged the woman and she relented. When he arrived in Manado he went to the immigration office and asked for somewhere to stay.

Like the UNHCR, they asked him to leave.

Getty Afghan refugees: In numbers 2.7mNumber of refugees worldwide (second only to Syria) 92% Are in Iran or Pakistan

13,600 Are in Indonesia (asylum seekers and refugees)

56%Of Indonesia's asylum seekers and refugees are Afghans Source: UNHCR

After another night on the street, the immigration staff sent him to a house used as a "waiting room" until a detention centre had space.

Shams lived there for 16 months.

The house had seven bedrooms with up to 14 or 15 people sleeping in each. There was one toilet and one shower, but not enough water for both. Instead, they washed in a nearby river with buckets.

There was drinking water and food, but it was basic - rice, potatoes, occasionally a chicken wing. "For 16 months, I don't remember any vegetables," says Shams.

But worse than the lack of vegetables was the lack of freedom.

As an asylum seeker, he couldn't study, couldn't work, and couldn't travel. He was trapped in the house; trapped in Indonesia; and trapped by his memories of Taliban gunmen.

"It felt like somebody had injected that fear into my mind, into my whole body," he remembers. "It was disturbing me all the time. I was hitting my head with my hands."

Then, in 2016, he had some good news, of sorts. He was being locked up.

The detention centre in Pontianak - on the other side of Indonesia to the house in Manado - was like a prison, with high fences, barbed wire and a leaking roof. So why was it good news?

Because in Pontianak his application for refugee status would be considered. "Refugee" is a step-up from "asylum seeker" as it allows relocation to third countries, even if the chances are slim.

But - while there was hope - it was a long, endless tunnel, with only a faint, flickering light at the end.

"Even criminals, there is a specific period of time for their confinement," says Shams. "But for refugees there was no such date. We had to wait and wait and wait."

Image copyright Shams Hussaini Image caption The detention centre in Pontianak

Shams tried to be positive. He taught English to the inmates, acted as a translator, and completed a basic counselling course, organised by the International Organisation for Migration (IOM).

In 2017 he received refugee status and, on 27 July 2018, was finally released from the detention centre, as the Indonesian government began to close them down across the country.

The UNHCR does not comment on individual cases, but said that before December 2016, about 30% of the refugee population in Indonesia was in detention. Since a regulation from Indonesia's president came into force, most have been transferred out of these centres.

Shams new home was "community housing" in Batam. It is the preferred model for the IOM, which supports about 80 such facilities in Indonesia, home to more than 8,200 people.

"As Shams noted, living conditions in Indonesian immigration detention centres are extremely basic," the IOM told the BBC.

"IOM's role is to help asylum seekers and refugees detained in these facilities by improving living standards, including health and nutrition, while advocating with the Indonesian authorities to move detainees - particularly families - to community accommodation."

You may also like

In his community housing, Shams quickly led by example. As well as English lessons, he attended peaceful protests, calling on third countries - especially Australia - to accept more refugees from Indonesia.

Through this work, which was publicised on social media, he met an Australian woman on Facebook who worked as a refugee advocate. When she came to Batam as part of her work, she invited Shams to use the pool at her hotel.

And that is why Shams Hussaini - 21-year-old Afghan refugee; English teacher; Taliban survivor - was able to smile at Francis Amos - round cheeks; one tooth; born eight months earlier in south London - as they passed each other on a Saturday afternoon in Batam.

Image copyright Shams Hussaini Image caption Shams with friends at the Batam community accommodation

So that is Shams' story (relayed in the pool, with more details on the phone later). But it is also a story of the 21st Century - because he is one of millions of displaced people surviving on its margins.

There are 26 million refugees globally and what drove them from their home - the war in Syria, for example - is often well-reported. What happens next can be forgotten.

Every year, fewer than 1% of refugees are resettled to third countries, which means vast numbers are left in limbo. They spend their days waiting, then hoping, then finally just waiting, and waiting, and waiting.

Other options include private sponsorship from third countries - which is rare - or returning to country of origin, which often isn't safe (Shams will not return to Afghanistan as he thinks he will be killed).

In the meantime, the camps get fuller, and the waiting lists get longer.

Shams' new home in Batam is better than Pontianak or Manado, and he is grateful for it. But he still has an 8pm curfew; still survives on $99 a month from the IoM; still can't travel. For him, this isn't living; it's surviving.

He dreams of becoming a humanitarian lawyer, and of seeing his family again. Their situation in Afghanistan is getting worse, he says - but he can't help until he is settled outside Indonesia.

"Any country that will accept me, I will go - no problem," says Shams. Until then, the waiting goes on: five long and lonely years since he boarded the bus in Kabul, and counting.

But thanks to his spirit - and the mystery woman on the bus in Qarabagh - he is still here. And he is still hopeful.

"To the woman who saved my life, thank you from the bottom of my heart," he ends with. "I will never forget your kindness. I hope some day I could repay you."