An 18-year-old Nigerian man has been granted asylum in Malta following anti-gay persecution in his country, protecting him from imprisonment and possible death by stoning or flogging.

The man was granted asylum by the Refugee Appeals Board in Malta this month, marking the first time asylum has been granted on such grounds in the country.

The Malta Independent reports he was initially turned down by the office of the Commissioner for Refugees in April.

In its ruling, the Board noted the recent judgement delivered by the European Court of Justice which ruled that gay asylum-seekers from an African country where people are jailed for being gay qualify for asylum in Europe.

The Board found that in Nigerian states applying Sharia law, consensual gay sex among men is punishable by death by stoning or flogging.

In May, the Nigerian Government passed a new anti-gay law, which stated that same-sex couples who attempted to cohabit or get married would face imprisonment of up to 14 years, while anyone “witnessing” or “abetting” such relationships would face custodial sentences of up to 8 years.

David Cameron said in June that he would raise the issue of the new law with the Nigerian Government, arguing that as a country with strong links to Britain, “nothing should be off the table” during discussions.

In July, the Nigerian law was denounced by the United Nations High Commissioner for Human Rights.

Nigeria is a member of the Commonwealth, and one of the 41 members which criminalise homosexuality.