The Australian High Court has ruled that two Bangladeshi gay men should be given the same asylum rights as political refugees.

The court heard that the men had been whipped and stoned

The men, whose names have not been revealed, fled to Australia nearly five years ago to seek asylum on the grounds that they would be socially ostracised and possibly persecuted by the Bangladeshi authorities because of their long-term relationship.

The High Court overruled lower court and immigration tribunal opinions that the men would not suffer adversely if they returned to Bangladesh and lived in a discreet manner.

It said that the Australian Refugee Review Tribunal should have considered what would happen to the men if they lived openly as a gay couple.

The defendants' lawyer, Bruce Levet, told Australia's final court of appeal that the couple had already been stoned and whipped for their sexuality and that the local Islamic council had issued a fatwa against them.

Mr Levet argued in his submissions to the High Court in April that the Review Tribunal's argument that the men would face no persecution at home if they were discreet was tantamount to arguing that Holocaust victim Anne Frank was safe from Nazis in World War II as long as she continued to hide in an attic.

"Having determined that homosexuality was unacceptable in Bangladesh and could lead to potential harm such as being bashed by police, the Refugee Review Tribunal erred in then holding that the men did not have a well-founded fear of persecution," the High Court said in a statement on Tuesday.

Australia has regularly come under fire from human rights groups for its tough immigration policy, which includes the mandatory detention of all illegal-entry asylum seekers.