A man in Saudi Arabia has reportedly been sentenced to death on charges of apostasy after losing two appeals.

Several local media reports identified the man as Ahmad Al Shamri, in his 20s, from the town of Hafar al-Batin, who first came to the authorities’ attention in 2014 after allegedly uploading videos to social media in which he renounced Islam and the Prophet Mohammed.

He was arrested on charges of atheism and blasphemy and held in prison before being convicted by a local court and sentenced to death in February 2015.

Authorities in Saudi Arabia have used a viral party video to identify and arrest partygoers in the country.

At the time Mr Shamri’s defence entered an insanity plea, adding that his client was under the influence of drugs and alcohol at the time of making the videos.

He reportedly lost an Appeals Court case, and a Supreme Court ruled against him earlier this week.

While news stories in the last few years consistently identify Mr Shamri, his identity or sentencing has not been verified by the Saudi authorities.

The Independent’s requests for comment from Saudi government representatives were not immediately answered.

10 examples of Saudi Arabia's human rights abuses Show all 10 1 / 10 10 examples of Saudi Arabia's human rights abuses 10 examples of Saudi Arabia's human rights abuses In October 2014, three lawyers, Dr Abdulrahman al-Subaihi, Bander al-Nogaithan and Abdulrahman al-Rumaih , were sentenced to up to eight years in prison for using Twitter to criticize the Ministry of Justice. AFP/Getty Images 10 examples of Saudi Arabia's human rights abuses In March 2015, Yemen’s Sunni President Abd-Rabbu Mansour Hadi was forced into exile after a Shia-led insurgency. A Saudi Arabia-led coalition has responded with air strikes in order to reinstate Mr Hadi. It has since been accused of committing war crimes in the country. Getty Images 10 examples of Saudi Arabia's human rights abuses Women who supported the Women2Drive campaign, launched in 2011 to challenge the ban on women driving vehicles, faced harassment and intimidation by the authorities. The government warned that women drivers would face arrest. Getty Images 10 examples of Saudi Arabia's human rights abuses Members of the Kingdom’s Shia minority, most of whom live in the oil-rich Eastern Province, continue to face discrimination that limits their access to government services and employment. Activists have received death sentences or long prison terms for their alleged participation in protests in 2011 and 2012. Getty Images 10 examples of Saudi Arabia's human rights abuses All public gatherings are prohibited under an order issued by the Interior Ministry in 2011. Those defy the ban face arrest, prosecution and imprisonment on charges such as “inciting people against the authorities”. Getty Images 10 examples of Saudi Arabia's human rights abuses In March 2014, the Interior Ministry stated that authorities had deported over 370,000 foreign migrants and that 18,000 others were in detention. Thousands of workers were returned to Somalia and other states where they were at risk of human rights abuses, with large numbers also returned to Yemen, in order to open more jobs to Saudi Arabians. Many migrants reported that prior to their deportation they had been packed into overcrowded makeshift detention facilities where they received little food and water and were abused by guards. Getty Images 10 examples of Saudi Arabia's human rights abuses The Saudi Arabian authorities continue to deny access to independent human rights organisations like Amnesty International, and they have been known to take punitive action, including through the courts, against activists and family members of victims who contact Amnesty. Getty Images 10 examples of Saudi Arabia's human rights abuses Raif Badawi was sentenced to 1000 lashes and 10 years in prison for using his liberal blog to criticise Saudi Arabia’s clerics. He has already received 50 lashes, which have reportedly left him in poor health. Carsten Koall/Getty Images 10 examples of Saudi Arabia's human rights abuses Dawood al-Marhoon was arrested aged 17 for participating in an anti-government protest. After refusing to spy on his fellow protestors, he was tortured and forced to sign a blank document that would later contain his ‘confession’. At Dawood’s trial, the prosecution requested death by crucifixion while refusing him a lawyer. Getty Images 10 examples of Saudi Arabia's human rights abuses Ali Mohammed al-Nimr was arrested in 2012 aged either 16 or 17 for participating in protests during the Arab spring. His sentence includes beheading and crucifixion. The international community has spoken out against the punishment and has called on Saudi Arabia to stop. He is the nephew of a prominent government dissident. Getty

Under Saudi Arabia’s strict religious laws, leaving Islam can be punishable by harsh prison sentences and corporeal punishment - and a 2014 string of royal decrees under the late King Abdullah re-defined atheists as terrorists, according to a report by Human Rights Watch.

Last year, a citizen was sentenced to 10 years in prison and 2,000 lashes for expressing atheistic sentiment in hundreds of social media posts.

Mr Shamri’s name and hometown have trended on Arabic-speaking Twitter in the last few days. Some users have even celebrated his sentencing.

“If you're a lowkey atheist that's fine. But once you talk in public & criticize God or religion, then you shall be punished,” one such post read.

“I wish there could be live streaming when you cut his head off,” said another.

International human rights watchdogs have consistently condemned Saudi Arabia’s human rights record.

The Kingdom came under further scrutiny last week when it emerged it had been elected to the UN’s women’s rights commission.

Under the country’s system of guardianship, women’s rights and freedom of movement is heavily restricted. They are not allowed to drive, and voted for the first time in 2015.

“Electing Saudi Arabia to protect women’s rights is like making an arsonist into the town fire chief,” UN Watch Director Hillel Neuer said. “It’s absurd.”