The European Court of Justice has ruled homosexuals who are at genuine risk of legal persecution have grounds to claim asylum in the European Union.
The Netherlands had asked the court whether three gay citizens of Sierra Leone, Uganda and Senegal could be considered part of a persecuted group.
The European Court of Justice said on Thursday that asylum can be granted in cases where people are actually jailed for homosexuality in their home country.
ECJ rulings apply to all EU members. But the BBC reports it is up to each country - in this case the Netherlands - to determine "whether, in the applicant's country of origin, the term of imprisonment... is applied in practice".
Homosexual acts are illegal in most African countries, including Uganda, Nigeria, Kenya and Botswana.
But the Court also ruled the mere existence of a ban on homosexuality is not grounds in itself for approving a request for asylum.