PHILADELPHIA (AP) — An asylum seeker from Ghana who said he was attacked by a mob led by his father because of his sexuality has shown a valid fear of persecution, a U.S. appeals case said in a case argued by two law students.

The petitioner, a gay man in his late 20s from Accra, said he had a secret relationship with a friend from his Muslim school days when his father found out in 2016 and flew into a rage. He said he was beaten, doused with kerosene and threatened with being beheaded before escaping, naked and bleeding.

He later made his way to the U.S., where immigration judges rejected his case, in part because it involved only a single attack. The initial judge suggested he could avoid further prosecution back home if he kept his sexuality a secret, according to the 3rd Circuit Court of Appeals ruling.

Same-sex male relationships are misdemeanors in Ghana and can bring up to three years in prison, the ruling said. The Associated Press is not naming the petitioner at the request of his lawyer, Adrian Roe of Pittsburgh, who fears for his client’s safety if he is deported and hopes to have his name redacted from court records.

“(He) was threatened with death by fire or decapitation while being assaulted, doused with fuel and exposed to a cutlass. All that was left for the mob to do was to cut off his head or set him on fire,” U.S. Circuit Judge L. Felipe Restrepo wrote in directing the immigration court to reconsider the claim.

The case was argued last year by then-students Paige Beddow and Scott A. Cain of the Immigration Law Clinic at West Virginia University College of Law. Justice Department lawyers in Washington, who opposed the asylum bid, did not immediately return a message left Tuesday with the press office.

“The government was arguing that one (attack) does not create a significant incident, or does not constitute past persecution. And the court said that one incident can be enough,” Roe said.