Ghoncheh Ghavami (Handout)
Ghoncheh Ghavami was arrested after attending a volleyball match, breaking Iran's gender segregation customs Handout

A British Iranian woman jailed after attempting to watch a men's volleyball match in Tehran has been released.

Ghoncheh Ghavami has been released a day before her 26th birthday after being held for five months at Gharchak prison in Tehran province, the BBC reports.

"It was unexpected," her brother Iman told The Telegraph. "We were hoping for some good news – but hadn't realised it would be this.

"I just spoke to her for a few seconds and the line wasn't good, but she sounded really happy."

He said that she was at her parents' home in Tehran, and was going to undergo medical checks, with doctors concerned that repeated hunger strikes may have damaged her health.

"She just needs to recover now," he said. "I don't think she realises about the campaign to free her. She needs to come to terms with it all," he added.

Ms Ghavami was arrested in June after attempting to enter Tehran's Azadi stadium with a group of other women.

In Iran, it is not illegal for women to attend men's sporting events, but it is prohibited by custom.

She was released only to be re-arrested with Iranian authorities claiming that they were holding her not for attending the match but for contacting opposition activists.

In recent months, it was reported that she had begun a hunger strike in protest at her detention, and hundreds signed an online petition demanding her release.

Her release comes a day after her mother wrote on her Facebook page condemning her daughter's treatment by Iranian authorities.

"After all this going back and forth and all the troubles we were given in the past month, they finally sentenced you to one year for a crime you never committed," she wrote.

"I cannot believe one year imprisonment for volleyball protest which they said had nothing to do with your charges. Or the photo of the grave of Neda Agha Soltan [a woman shot dead in anti-government protests in 2009] on your mobile phone or a few seconds of a video of the moment of release of a former prisoner who had served a full sentence.

"They held you in the detention centre for 129 days which forced you to go on hunger strike twice in order to demand your basic rights of being given a court hearing and being issued a verdict."