Gay equality organisation Stonewall has welcomed the announcement that an Iranian who claimed he would be killed if returned to his homeland because of his sexual orientation has been granted asylum in the UK.

“We are delighted and very grateful to Jacqui Smith for her intervention as Home Secretary and for the work that Simon Hughes, as the local MP, did on the case,” said Ben Summerskill, chief executive of Stonewall.

“We are also pleased that, answering questions in the House of Commons, the Foreign Office ministers have acknowledged the danger that gay people face in Iran.”

Mehdi Kazemi, 20, left Iran in 2004 to travel to England on a student visa and continue his education.

Two years later while still in the UK he learned that Iranian authorities had arrested his boyfriend Parham back in Iran, and that his boyfriend had been forced to name Mr Kazemi as someone with whom he had had a relationship.

Mr Kazemi’s father then received a visit from the Tehran police, with an arrest warrant for his son.

In late April 2006, Medhi’s uncle told him Parham had been put to death.

Mr Kazemi’s request for asylum was turned down by the United Kingdom.

After fearing for his life he fled to Netherlands and sought asylum there.

He was returned to the UK in April and the Home Secretary said she would review his case after a campaign started by gay rights activists was taken up by The Independent newspaper, MPs, MEPs and members of the House of Lords.

Mr Kazemi is reported to have told community website UKGayNews that that he has received a letter from the Border and Immigration Agency informing him that his asylum request has been granted.

Since Iran’s Islamic revolution in 1979, human rights groups claim that between 3,000 and 4,000 people have been executed under Sharia law for the crime of homosexuality.

The British government has been accused of being more inclined to believe Iran than human rights groups on the issue of how gay people are treated in that country.