Hosni Mubarak, Egypt's former president, has been ordered to be detained for 15 days, along with his two sons, pending investigations into accusations of corruption and abuse of authority.
Egypt's prosecutor general made the announcement early on Wednesday, a day after the former leader was hospitalised in Sharm el-Sheikh.
In a statement, the prosecutor general's office said the ongoing investigation was into allegations of corruption, the wasting of public money and the abuse of position for personal gain.
|Mubarak's sons Alaa, left, and Gamal have been taken
to prison pending investigation [AFP]
Mubarak's sons Gamal and Alaa were driven away in a police van with drawn curtains as an angry crowd of 2,000 people pelted the car with water bottles, stones and their flip-flops, a sign of disrespect in the Arab world.
"Brothers, whatever you wanted, you have got ... 15 days," said Major-General Mohammed el-Khatib, the head of provincial security in the South Sinai.
Gamal, Mubarak's younger son, was a senior official in the ruling party and was widely seen as being groomed to succeed his father before popular protests brought down the regime.
His increasing role in the government over the last decade and the belief that he might succeed his father helped galvanise Egypt's protest movement.
Al Jazeera's Zeina Khodr, reporting from Cairo, said that Mubarak's sons have already been questioned for two days at a courthouse near Sharm el-Sheikh. They arrived in Cairo on Wednesday morning and were taken to a prison where they are expected to be detained for the duration of the investigation.
At least 800 people are estimated to have been killed during the protests as police opened fire on the crowds. Authorities are now investigating government officials for their role in ordering the violence.
Gamal is also believed to be the architect of Egypt's privatisation programme and economic liberalisation, which has brought in billions in foreign investment but has 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. There are allegations that they used their positions for personal gain.
Mubarak was questioned on Tuesday in hospital by prosecutors at the Red Sea town of Sharm el-Sheikh, where he has been staying since he was ousted from power by a popular uprising on February 11.
|Click here for more of Al Jazeera's special coverage
Mubarak, 82, was taken to an intensive care unit after suffering heart problems when he was being questioned during an investigation, state television reported.
It did not give further details about his health or about the investigation.
Asked if Mubarak was in good health, Mohammed Fathallah, the hospital's director, replied: "Somewhat."
Our correspondent in Cairo said that doctors have now announced that Mubarak is reported to be unwell, but in a stable condition.
Khodr said that many people believe that Mubarak's illness was a ruse to escape prosecution, with many implicating the military in the rumoured plot.
"A lot of Egyptians, particularly in Tahrir Square, said this is just ridiculous, this is a lie, it's a game ... they even accuse the army - the new rulers in this country in the interim phase - of actually orchestrating this to find some way out so Mubarak won't be prosecuted," said Khodr.
News of the investigations, she said, will "ease tensions", especially at a time when the army is being viewed with some suspicion by the public, who, as of late have been "questioning the motives and actions of the army, especially since the army has been detaining hundreds of activists".
Egyptian security officials told the AP news agency that Mubarak arrived under heavy police protection at the hospital, which was picketed on Tuesday by pro-democracy activists.
Al Jazeera's Jamal Elshayyal, reporting from Sharm el-Sheikh, said that a group of protesters who had gathered outside the hospital were attacked and beaten by another group of men.
Journalists at the scene were also attacked.
"All this under the supposedly watchful eye of the security forces who stood by and did nothing," Elshayyal said.
A military source told our correspondent that a decision had already been made to transfer Mubarak from Sharm el-Sheikh to Cairo.
It remains unclear whether the deposed president will be sent to a hospital in Cairo or a prison.