Egypt's former president Hosni Mubarak has been detained and his two sons are being held in prison as officials investigate allegations of corruption and abuse.

The 82-year-old Mubarak reportedly suffered a heart attack while being questioned on Tuesday night. His two sons, Gamal and Alaa, have been transferred to the notorious Tora prison, south of Cairo, where many of Mubarak's political prisoners were holed up for years.

A statement from the prosecutor general's office announcing Mubarak's detention said the ongoing investigation would examine allegations of corruption, the squandering of public funds and the abuse of authority for personal gain.

"The prosecutor general orders the detention of former president Hosni Mubarak and his sons Gamal and Alaa for 15 days pending investigation after the prosecutor general presented them with the current state of its ongoing investigations," it said.

Egypt's interim government issued subpoenas to Mubarak and his sons over the weekend, compelling them to testify in court over claims they illicitly acquired wealth and abused their power during the former president's reign.

Mubarak was hospitalised with heart problems in Sharm el-Sheikh overnight. But the justice minister, Mohammed el-Guindi, said Mubarak had been questioned, indicating his condition was not as bad as first thought.

It is believed Mubarak is to be transferred by military plane from Sharm el-Sheikh to a military hospital in Cairo, although the prosecutor-general has said his interrogations may have to take place outside the capital for security reasons.

Gamal Mubarak, his younger son, was a top official in the ruling party and was widely seen as being groomed to succeed his father before 18 days of popular protests brought down the regime on 11 February.

He was arrested with his businessman brother Alaa in Sharm el-Sheikh on Tuesday night, and both brothers have been transferred to Tora prison. Witnesses said Gamal and Alaa arrived "in a state of disbelief", handcuffed and clad in white prison jumpsuits.

The stockmarket has jumped on news of Mubarak's arrest. Last week an Arabic document was made public detailing evidence the prosecutor-general has handed to western nations to assist them with tracking down and freezing Mubarak's assets – which the Washington Post recently estimated were worth up to $700bn (£430bn).

About 800 people are estimated to have been killed during the protests in Egypt as police opened fire and cracked down on the crowds. Authorities are investigating government officials for their role in ordering the violence.

Gamal is also believed to be the architect of Egypt's privatisation program and economic liberalisation, which has brought in billions in foreign investment but also widened the gap between rich and poor. Many of his close associates were billionaires and held senior positions in the ruling party and the government.