A view of the presidential palace through barbed wire in Cairo, in 2012. (Petr David Josek/AP)

An American citizen accused of joining the Islamic State was detained by Egyptian authorities and held in secret for four months in a prison where he was allegedly tortured and raped, Human Rights Watch said Thursday.

The watchdog group said Egyptian national security agents arrested and “forcibly disappeared” Khaled Hassan, 41, a limousine driver from New York, on Jan. 8 in the coastal city of Alexandria. Hassan was born in Egypt and became a naturalized American several years ago, the group said.

In the following weeks, security forces “severely beat him, gave him electric shocks including on his genitals, and anally raped him in at least two incidents, once with a wooden stick and once by another man,” Human Rights Watch said in a statement.

Egyptian authorities, responding to a letter sent by the group, denied the allegations of torture. But Human Rights Watch said independent forensic experts who reviewed footage of Hassan’s wounds found them consistent with torture. The group urged Egyptian prosecutors to open an investigation into the torture claims.

Despite efforts by Hassan’s family to get information about his whereabouts from Egyptian authorities immediately after his disappearance, it was not until May 3 that the relatives learned of his imprisonment. Egyptian authorities told Human Rights Watch that Hassan was arrested only that day.

That was also when Hassan appeared before a military prosecutor and was accused, along with hundreds of others, of joining the Islamic State affiliate in Egypt’s volatile northern Sinai province to spy on the army and plot attacks.

Human Rights Watch said Hassan spoke with the group and denied that he had joined the Islamic State. He said he was simply visiting his wife and children, who lived in Egypt, as he frequently did.

Human Rights Watch said it reviewed police reports and legal complaints filed by Hassan’s family to authorities in January and February seeking his whereabouts. A few days after his disappearance, security agents raided Hassan’s house and ordered his wife and children to leave Egypt, where they have lived for 11 years, the group said. The family is now in the United States.

Hassan is still being held in pretrial detention at Cairo’s Istiqbal Tora Prison, said Human Rights Watch, adding that he has had insufficient food and improper health care. No date has been set for his trial.

Under President Abdel Fatah al-Sissi, tens of thousands have been imprisoned, including political opponents and critics, often over allegations of committing terrorism or joining outlawed groups. Human rights groups have documented widespread torture of detainees by Egyptian security forces, as well as hundreds of “forced disappearances,” in the five years since Sissi assumed leadership of the country.

At least 16 American citizens, all of Egyptian descent, are thought to be imprisoned by Egyptian authorities, according to Mohamed Soltan, development director with the Freedom Initiative, a Washington-based human rights advocacy group that focuses on political prisoners in the Middle East.

“Hassan’s disappearance and detailed allegations of torture and the government’s denials reinforce the reality that Egyptian security forces operate with impunity,” Michael Page, deputy director of Human Rights Watch’s Middle East and North Africa division, said in a statement.

“Khaled Hassan has been able to bring the gruesome details of his treatment to light, but thousands of others held in Egypt’s prisons have not been able to tell their stories,” he said.