Beit Hanoun, Gaza Strip - When the Israeli army arrested Palestinian Tamer al-Zaanin a month and a half after his marriage in 2006, his wife, Hana, was still studying Sharia at the Islamic University in Gaza City.

Her husband had been sentenced to 12 years in prison on charges of being an operative with Islamic Jihad. Having plenty of time with no children, Hana enrolled again in the same university after graduating; this time she is majoring in math.

But she won't have nearly as much free time in the coming years. Last week, she gave birth to a baby boy, Hassan, through in-vitro fertilisation, marking the first case in Gaza in which a prisoner managed to impregnate his wife with sperm smuggled out of prison, following six successful births in recent years in the West Bank.

"I can't describe how happy I am," said the 26-year-old mother from behind a black veil. "It's an indescribable feeling that seven years on since my husband was arrested, I gave birth from a smuggled sperm," she added as women and relatives sat around her bed in the family hometown of Beit Hanoun.

"Sperm smuggling from inside the jails constitutes a challenge to the Israeli jailer," said Fouad al-Khafsh of the Ahrar Centre of Prisoners' Studies. Khafsh told Al Jazeera that dozens of prisoners, especially those serving long or life sentences, try to have children using in-vitro fertilisation.

I did not know how Tamer, my husband, will receive my suggestion … I did not know if he will be happy or mad at me." - Hana al-Zaanin, wife of Palestinian prisoner

While surfing the Internet, Hana Zaanin read about the first successful birth of a baby with sperm from a prisoner from Nablus. She admired the idea and decided to propose it to her husband.

"I spent weeks thinking of it and considering my family's reaction," she told Al Jazeera. "Most importantly, I did not know how Tamer, my husband, will receive my suggestion … I did not know if he will be happy or mad at me."

Tamer, who was arrested along with two cousins in a raid at their home, is scheduled to complete his prison term in 2016. "I was encouraged to tell him after my family and Tamer's father accepted the idea," Hana said. "At the end of the day, the matter was up to him to agree or reject."

Last year, Hana was allowed to visit her husband for the first time since his arrest. At the prison, she summoned up the courage to inform Tamer of the idea. "My heart sank when he paused for a few seconds, but I was relieved when I saw his smile behind the glass board separating us," she recalled. To her surprise, Tamer nodded in agreement. "Moreover, he had also thought of telling me but was afraid of my reaction."

But a series of challenges soon emerged. How could the semen be taken out of the prison, as Israel doesn't allow physical contact between the prisoners and their families? And how could the sperm be kept alive for at least six hours, the time needed for families to return to Gaza after the visit?

An Israeli decision to allow children under the age of eight to go behind the glass boards and hug their fathers enabled Tamer and Hana's scheme to succeed. Two of Hana's brothers are also jailed in Rimon prison with Tamer, and one of them has kids. So Farid's son, Rami, tossed a box containing his brother-in-law's sperm into his son's jacket during one of the visits.

At Erez checkpoint between Gaza and Israel, which is open only to international aid workers, some Gaza journalists and businessmen and desperate humanitarian cases, Hana was waiting impatiently for the sample.

"I felt time is ticking quickly," she recalled. Dr Abdel-Kareem Hindawi, a gynaecologist at the Gaza-based Basma IVF Center, told Al Jazeera the sperm was still alive and in excellent condition when he received it. The doctor and his colleagues began processing the sample and the insemination went smoothly.

"I and my colleagues were extremely happy because we succeeded in bringing joy to Zaanin family," he said. "It's our pleasure to make the dream of women true, as long as this doesn't contradict with laws and Islam."

Hindawi revealed that four other prisoners' wives are pregnant from sperm smuggled from their husbands. He also noted that samples from many older prisoners were too weak to be effective.

Hassan, Tamer's son, was born in good health, weighing 3.1 kilos. Hana says Tamer heard the first cries of their son over the phone.

The Zaanin family home was swamped with visitors from Palestinian factions and officials with posters congratulating the family on the birth of Hassan.

Asked if she will try to get another baby in the same way, Hana shrugged. "I will wait for Tamer to get out of the prison because I don’t want him to be deprived from seeing his children growing up in front of him."