The youngest son of the late former Egyptian president Mohamed Morsi has died of a heart attack he suffered while driving in Cairo, doctors said.

Abdullah Morsi, 25, was with a friend on Wednesday when he suddenly felt weak, and died shortly after arriving at a hospital in the capital, according to physicians who spoke on condition of anonymity because they were not authorised to brief journalists.

Mohamed Morsi had been held in detention since his divisive year in power ended when he was ousted by the military in 2013 after mass protests. In June, he collapsed and died in court during a trial on espionage charges. His death provoked criticism from local and international rights groups, who accused the government of deliberately denying medical care to political prisoners.

Last year, Abdullah Morsi was briefly detained for allegedly spreading false news and belonging to the Muslim Brotherhood, the outlawed Islamist group in which his father had held a leadership position. In the same year, his older brother Osama was sentenced to 10 years in prison in a mass trial that Amnesty International decried as a “mockery of justice”. He and the other defendants were convicted of allegedly inciting violence at a pro-Mohamed Morsi sit-in that police stormed, killing hundreds of protesters.

Gamal Heshmat, a Muslim Brotherhood leader who lives in Turkey, said in an interview with al-Jazeera Mubasher news channel that he hoped Abdullah Morsi’s death “would wake people up and attract their attention to the situation of the youths who die every day either morally or physically” in Egyptian prisons.

“Egypt itself has turned into a prison,” Heshmat told the Qatar-funded broadcaster, known for its support of the Muslim Brotherhood, which the Egyptian government has labelled a terrorist organisation.

Last year, Morsi told Associated Press in a rare interview that the family had been campaigning to improve his father’s prison conditions, complaining that he was denied prison visits. “We want him to be able to have a life – visits and medical care, and eventually freedom,” he said.

During his year in office, Mohamed Morsi was accused of using his electoral victories to further the Muslim Brotherhood’s Islamist political agenda. He cracked down at times on protesters and used executive powers to force through policies, but never managed to control the levers of power, facing opposition in the courts and among police. In the end, his opponents organised mass protests against his rule, and it was against this backdrop that he was overthrown.

Since then, the Egyptian government has largely crushed the Muslim Brotherhood in a ruthless crackdown. Tens of thousands of Egyptians have been arrested and many have fled the country.

Abdullah Morsi’s sudden death has shocked many Muslim Brotherhood members living in exile, who have seized the opportunity to express their disenchantment with the rule of Abdel Fatah al-Sisi.