Image copyright Roskosmos Image caption Abdulahad Momand (right) and Flight Engineer Valery Polyakov on the Soyuz spacecraft

In 1988, just as the Soviet army was preparing to pull out of Afghanistan, a rocket blasted off carrying the first and only Afghan to travel into space. Abdulahad Momand returned to earth a hero - but within three years he was forced to flee the country.

"When I was little I used to look up at the sky. Sometimes planes would appear overhead and I would think how great it would be if I could fly," says Momand.

He is remembering a childhood in Afghanistan half a century ago.

Sure enough, he became a fighter pilot in the Afghan air force, and this opened the door to another opportunity the young Ahad could never have imagined.

He was selected from more than 400 candidates to be the first Afghan to join the Soviet space programme, and moved at the age of 29 to the Cosmonauts' Training Centre in Star City, outside Moscow.

Image copyright Roskosmos Image caption The Soyuz crew and back-up team

Veteran cosmonaut Vladimir Lyakhov, who was to be his flight commander, liked the young Afghan from the start. They had fun together, both on Earth and in space - for example, when Ahad had to be filmed reciting from the Koran on board the space station, at the Afghan government's request.

"Ahad put on a skull cap, to do it," says Lyakhov, now in his 70s. "He was being filmed from below and I was just out of shot hanging on to his legs to stop him floating off."

They timed their 90-minute stints on the station exercise bike, by looking out of the window, Lyakhov says.

Media playback is unsupported on your device Media caption Ahad Momand returns to Star City (archive footage courtesy of RSC Energia)

"Someone said, 'Look we're just flying over Canada, so if you keep going till Canada comes round again, then you'll have done a complete circuit.'"

Both of them had need of their sense of humour as they made the return journey to Earth - and the computer systems on the Soyuz space-craft malfunctioned. They came within seconds of losing their engines and being trapped in space forever.

For 24 hours, while mission control frantically reprogrammed the on-board systems in preparation for another landing attempt, Ahad and Lyakhov were orbiting the Earth alone in their tiny landing capsule. Their predicament made headlines around the world - they had no food, no water, no toilet and only enough oxygen to last two days.

So how did they pass the time?

"To be quite honest with you, we told each other lots of jokes," says Ahad.

Image copyright Roskosmos

When they finally landed in Kazakhstan, both were smiling broadly as they came out to face the Soviet television crews, though they were well aware it had been a close-run thing.

"As we landed Ahad said to me Commander, don't fly for a fourth time," Lyakhov remembers. "Allah won't forgive you for it."

Find out more Image copyright Roskosmos Watch The Spaceman of Afghanistan on BBC's Persian service online on Monday 24 March at 16:30

"I told everyone, old spaceman Vladimir Lyakhov's flying days are over. And Ahad was right. I never flew again."

He arrived in Kabul with Lyakhov in 1988 to a hero's welcome. Cheering crowds lined the roads - while the mujahedin fighting the Soviet occupation fired an angry barrage of rockets on to the city.

This year Ahad returned there with the BBC for the first time since 1992, uncertain how he would be received.

Only a year after his triumphant return from space, the Russians had withdrawn from Afghanistan, he had been appointed deputy civil aviation minister and the mujahedin were closing in on Kabul.

He left on a hastily arranged business trip just days before the Soviet-backed government collapsed. In the orgy of violence that followed, he would most certainly have been a target as one of the most famous faces of the Communist era.

Image caption Czech-made L39 fighter jet at Kabul military airbase - Momand used the same for training in the 1980s

But on his first trip back to Afghanistan for 25 years, he has barely arrived when President Karzai's office rings, inviting him for lunch.

"He was very kind," Ahad says afterwards. "He told me straight away that even though he was fighting against the Soviets when I went to space, he still felt very proud and happy."

One evening he's invited to go star gazing with a group of young astronomers. They're thrilled to see him, and insist on setting up their telescope even though the sky is covered in heavy cloud.

The Magazine on space Image copyright Lebanese Rocket Society During the 1960s, the US and the Soviet Union competed for supremacy in space. But there was another contestant in the race - the Lebanese Rocket Society, a science club from a university in Beirut, writes Richard Hooper. Lebanon’s forgotten space programme

"I told the children we're still going to see a star," says the head of the astronomy centre. "Not a star up in the sky but one right here on earth."

Ahad is nervous about being out at night in the dark on a remote Kabul hillside. But the young astronomers' enthusiasm is infectious. By the end of the evening he's signing autographs and fielding questions from a new generation of would-be space travellers.

Ahad is clearly inspired by today's young Afghans.

"This is something that makes me happy," he says. "It gives me hope for a better future."

As they pack up, one of the teachers says he's never been able to forget watching Ahad on television speaking live to Afghanistan's then president, Mohammad Najibullah, from space.

"You told him that Afghanistan was very beautiful from space," he says. "And that it looked so peaceful."

Ahad remembers that conversation too.

"My message is still the same as it was back then," he says. "Afghans do not need war. Please come together and please stop fighting."

Since 1992 Ahad has lived in Germany.

His life is very different now - he's not a fighter pilot, or a cosmonaut, or a government minister, he's an accountant in a small firm in Stuttgart. He lives on the outskirts of the city with his wife and three children. It's less exciting, perhaps, but a good example of the peaceful normality the only Afghan to have visited space wishes for his own country.

Follow @BBCNewsMagazine on Twitter and on Facebook