A UK immigration judge rejected the asylum claim of a man from a country where homosexuality is illegal in part because he did not have a gay “demeanour”, a lawyer has revealed.

The judge in the first-tier immigration tribunal in London said he did not accept the man applying to stay in the UK was gay and contrasted his appearance with that of a witness who “wore lipstick” and had an “effeminate” manner – who the judge accepted was gay.

The details of the written determination effectively suggesting the asylum seeker was not effeminate enough to be gay have been revealed by the claimant’s barrister, Rehana Popal, who described the comments as like something “from the 16th century”.

She said the judge was guilty of “a stereotype embedded in prejudice” and that such attitudes were not unique in the immigration courts.

The determination has not been published and the judge has not been named as the tribunal is not a court of record. Popal said the judge wrote of the claimant “I have seen his demeanour”, before comparing it to that of another witness about whose homosexuality he had no doubt, “not just that he wore lipstick and had an effeminate way of looking around the room and speaking but he is also a member of a gay community organisation”.

“He has taken a stereotype, used it as a benchmark and compared my client to it,” said Popal. “That is totally wrong. You do not need to dress a certain way, carry yourself a certain way or look a certain way to be homosexual. The only thing that makes a person gay is if they are attracted to someone of the same gender.”

Popal said her client feared for his safety if he were forced to return to his home country and that his older male partner’s own asylum claim in front of another immigration judge involved making a very similar case and was successful a month earlier.

In his determination, the judge referred to the age difference between them and said: “I understand that on the gay scene younger men are highly valued.” Popal described this as a homophobic stereotype, which plays into myths about gay men and paedophilia.

The man appealed against the judge’s assessment of his demeanour to a higher court, where it was defended by a representative of the Home Office, Popal said. That tribunal said last week that the first judge had been wrong and sent the case back to be started afresh.

“It demonstrates the extent to which these cases are so subjective,” Popal said. “We have good laws in place but the problem is their application. I have had clients who are Muslim and gay and the Home Office sometimes says you can’t be both.”

In other instances asylum tribunal judges have not accepted that previously married women can be lesbians, she claimed.

Asked to comment, the Home Office said the appeals process and judges decisions were independent of government.

A spokesperson said: “The UK has a proud record of providing protection for asylum seekers fleeing persecution. Each case is considered on its individual merits by experienced caseworkers, with all available evidence carefully and sensitively considered in light of published country information.”

It cited Home Office guidance to asylum caseworkers that insists they “must not stereotype the behaviour or characteristics of gay or bisexual persons”. The guidance defines sexual orientation as about a person’s capacity for “profound emotional, affectional and sexual attraction” to certain genders rather than anything about appearance or demeanour.

The ministry added that it would not remove asylum seekers who have had to leave their countries because their sexuality or gender identity has put them at risk of persecution.