The European Union’s highest court has ruled that gay people from three African countries, who feared persecution due to their sexual orientation, have grounds for asylum in the EU.

The Netherlands had asked the European Court of Justice (ECJ) for advice about three gay citizens who were seeking asylum from Sierra Leone, Uganda and Senegal.

Initially the application was denied as the Dutch authorities ruled that gay people could “exercise restraint” to avoid persecution.

On Thursday, the European Court of Justice rejected the Dutch policy. The court ruled that it was not reasonable to expect people to conceal their sexuality in their countries of origin in order to avoid persecution. It said: “A person’s sexual orientation is a characteristic so fundamental to his identity that he should not be forced to renounce it”.

ECJ rulings apply to all EU members. The ECJ says laws specifically targeting gay people do make them a separate group.

But it is up to the national authorities – in this case the Netherlands – to determine “whether, in the applicant’s country of origin, the term of imprisonment… is applied in practice”.

The mere existence of a ban on homosexuality is not grounds in itself for approving an asylum request, the ECJ ruled.

In July 2010, the UK Supreme Court quashed a Home Office policy that claimed two gay men from Iran and Cameroon could be safely returned home if they were “discreet” about their sexual orientation.

Despite the ruling, human rights groups, MPs and lawyers have frequently documented alleged cases of the Home Office deporting LGBT asylum seekers back to countries such as Uganda and Cameroon where they face persecution.

The claims have always been denied by the Home Office.

According to the UK Lesbian and Gay Immigration Group (UKLGIG), 98-99% of claims made by LGBT asylum seekers were rejected in 2010 – compared to 73% for claims made on other grounds.