An Afghan man is believed to have become the first atheist to be granted asylum in the UK on the basis of his views on religion.

The 23-year-old, who has not been identified, feared that if forcibly returned to his homeland he would face persecution for having renounced his faith.

The Home Office's decision to accept denial of the existence of God as grounds for protection could set a significant precedent in asylum and immigration cases. The application was granted before the hearing stage at an immigration tribunal.

The Afghan was brought up as a Muslim and fled the conflict in his native country. He arrived in the UK in 2007, aged 16. He was initially given temporary leave to remain until 2013 but during his time in England gradually turned to atheism.

His case was taken up by Kent Law Clinic, a free service provided by students and supervised by qualified practising lawyers from the University of Kent's law school along with local solicitors and barristers.

They helped him submit his claim to the Home Office under the UN's 1951 refugee convention, arguing that if he returned to Afghanistan he would face persecution on the grounds of religion – or in his case, lack of religious belief.

He could, the lawyers argued, face a death sentence under sharia law as an apostate unless he remained discreet about his atheist beliefs. Evidence was also presented showing that because Islam permeates every aspect of daily life and culture in Afghanistan, living discreetly would be virtually impossible.

That principle was established by a landmark hearing at the supreme court in 2010 which ruled that it would be unreasonable to return two gay men to Cameroon and Iran on the grounds that they could be discreet about or hide their sexuality.

Claire Splawn, a second-year law student at the University of Kent, prepared the case under the supervision of the clinic's solicitor, Sheona York. Splawn said: "We argued that an atheist should be entitled to protection from persecution on the grounds of their belief in the same way as a religious person is protected."

York added: "We are absolutely delighted for our client. We believe that this is the first time that a person has been granted asylum in this country on the basis of their atheism.

"The decision represents an important recognition that a lack of religious belief is in itself a thoughtful and seriously-held philosophical position."

The status of atheism under the 1951 refugee convention is not consistently applied by countries around the world. Australia has accepted atheism as grounds for asylum for those fleeing religious persecution in Afghanistan. But the US courts have dismissed claims, ruling that atheists do not have defined beliefs or practices for purposes of American asylum regulations.

Asked whether the Afghan asylum case was the first involving atheism, a Home Office spokesperson said: "We do not routinely comment on individual cases. The UK has a proud history of granting asylum to those who need it and we consider every application on a case by case basis."