A U.S. citizen detained in Egypt for more than six years died Monday after a lengthy hunger strike and pressure from U.S. officials failed to secure his release.

Mustafa Kassem, who was 54, died of heart failure following his hunger strike, according to Pretrial Rights International, a nonprofit organization that represented Kassem. David Schenker, the assistant secretary of state for Near Eastern Affairs, confirmed Kassem’s death and expressed the U.S. belief that the terrorism charges against him were meritless.

Schenker told reporters he was saddened at Kassem’s death in custody, calling it “needless, tragic and avoidable.” He vowed to continue raising U.S. concerns about human rights abuses in Egypt and Americans detained in the country.

Senior U.S. officials, including Vice President Pence and Secretary of State Mike Pompeo, repeatedly raised Kassem’s case with the government of President Abdel Fatah al-Sissi. Egypt is considered a close ally of the United States, which provided $1.4 billion in aid to Cairo in fiscal year 2019. And President Trump has called Sissi “a great president.” But the State Department’s annual human rights report has condemned the country’s human rights record, spelling out the detention of political prisoners and harsh prison conditions.

Kassem was arrested in August 2013 during a tumultuous period in Egypt, a month after the military seized power after protests against the elected government of Mohamed Morsi. On the day of Kassem’s arrest, Egyptian authorities stormed a sit-in by Muslim Brotherhood supporters in a Cairo square called Rabaa al-Adawiyah, killing as many as 1,000 people, according to human rights groups.

Kassem appears to have been caught in a sweep up. He was arrested at a nearby shopping center, where he had gone to exchange money shortly before his return to the United States, according to the Freedom Initiative, a group that advocates for Egyptian political prisoners.

“After showing his US passport, the soldiers beat and detained him, later transferring him to law enforcement officials who continued this harsh treatment,” the group said in a statement, adding that Kassem was diabetic and had a heart condition, but was provided with limited access to medications and medical care during his detention.

After a visit to Cairo in January 2018, Pence told reporters that he had spoken with Sissi about the imprisonment of Kassem and another American citizen.

Sissi “assured me that he would give that very serious attention in both cases. I told him we’d like to see those American citizens restored to their families and restored to our country,” Pence said, according to a State Department transcript of his comments.

Kassem was convicted and sentenced later in 2018 in a mass trial along with hundreds of other defendants, according to the Freedom Initiative. On the day of his sentencing, he began a “liquid-only” hunger strike, the group said.

The New York City taxi driver and father of two had written letters to Trump and Pence pleading for their help, to no avail.

“Last Thursday, he ceased taking liquids and was shortly thereafter transferred to a local hospital, where he passed away today in the late afternoon,” the group said.