Egypt awoke Wednesday to something unthinkable only a few months ago: Hosni Mubarak, the former president who had held the world’s most populous Arab country in his hand for more than three decades, being called to account for the questionable wealth and unchallenged power he had amassed in that time.

Also undergoing interrogation, according to a report in the government-owned al-Ahram newspaper, were Mubarak’s wife, Suzanne, his older son, Alaa, and his younger son, Gamal, the jet-setting investor whom Mubarak had been grooming as his possible successor.

Egypt’s top prosecutor said in a decree issued by the government’s press office that Mubarak, 82, and his sons had been detained for 15 days for questioning about the origins of their family’s riches. The former president would also face questioning about the use of violence to suppress 18 days of protests that drove him from power, the prosecutor said.

Mubarak’s wife, meanwhile, was under investigation for alleged financial improprieties involving the Library of Alexandria and a reading festival, al-Ahram reported.

News of Mubarak’s detention was greeted with a mixture of joy and relief in some quarters here, caution in others. The Egyptian stock exchange rose, and the Coalition of Youth Revolution called off plans for yet another protest march on Cairo’s Tahrir Square after midday prayers Friday.

Some Egyptians voiced skepticism, saying they worried that Mubarak’s case could be handled behind closed doors.

“We want a fair trial for them — and for it to be broadcast on TV to enable all people to see what is really going on there,” said Sameh el-Sayyed, 26, a plumber.

Wednesday’s announcements appeared to signify a turning point in the relationship between Mubarak and the military leadership that has ruled the country since his fall Feb. 11.

“They’re separating themselves from Mubarak to save the stability of their organization,” said Zyad el-Elaimy, an official with the presidential campaign of pro-democracy activist and Nobel Peace laureate Mohamed ElBaradei and a board member of the Coalition of Youth Revolution.

But the most immediate effect of the detentions could be to reset the increasingly tense relationship between the military and the Egyptian people.

The army is generally well regarded here, and soldiers had been hailed as guardians of the revolution when they intervened to halt street battles between Mubarak’s security forces and demonstrators during the 18 days of protest. An often-heard slogan was: “The army and the people are one hand.”

In recent weeks, though, the military had become a target of popular fury, its leaders accused of reneging on promised reforms, detaining government critics for trial by military tribunals and moving too slowly to try Mubarak.

Many in the pro-democracy movement were especially alarmed when the army used force to break up a protest early Saturday that had also involved some mutinous soldiers, triggering the worst bloodshed since Mubarak’s departure.

Members of Egypt’s youthful protest movement took the decision to detain the former president and his family as a sign that the ever-larger demonstrations they have staged since Mubarak’s ouster had worked, a view seconded by some observers.

“I think it’s really taking place because of this public pressure,” said Ramadan A. Kader, editor in chief of the Egyptian Mail newspaper. “The ruling military took the issue so seriously because they didn’t expect so many protests or in such great numbers.”

Augustus R. Norton, a Middle East specialist at Boston University, said the Mubaraks’ detention suggests that the military is serious about moving toward reforms and represents a first blow to Egypt’s long-standing tradition of impunity for its leaders.

“What I think happened is quite dramatic,” he said. “I would be extremely shocked if the president were really prosecuted. But I would not be surprised if one of his sons was prosecuted.”

On Wednesday, Egyptian investigators continued questioning Mubarak at a hospital in the Red Sea resort of Sharm el-Sheikh after he fell ill during interrogation Tuesday. The prosecutor’s office said Mubarak suffered from an unspecified heart problem and high blood pressure.

Gamal and Alaa Mubarak, meanwhile, were taken to Tora prison outside Cairo, arriving unshaven and in white sweat suits, according to al-Ahram. Quoting a medical source in the prison, the newspaper said Gamal, who has been linked to one of the Middle East’s largest hedge funds, appeared to be in “total disbelief.”

So were many of their countrymen, pleasantly so.

“I was very happy and felt that justice is still possible when I heard that the Mubarak family is being tried,” said Fatma Qotb, 24, an accountant who also admitted she had felt sympathy for Mubarak just before he stepped down. But a defiant speech he delivered Sunday had hardened her, she said, adding that it was time to hold him accountable.

“Trying Mubarak and his family can’t get back the rights of every person, but at least they can get back the public funds they stole,” she said.

With steps being taken toward Mubarak’s possible prosecution, some say the Supreme Council of the Armed Forces appears to be sending simultaneous messages to Egyptians: We hear you, but you must not cross certain lines — including making the military a target.

Many people who have flocked to Tahrir Square demanding change seemed receptive Wednesday.

“I think a lot of people will go to celebrate,” Elaimy said.

Special correspondents Sherine Bayoumi, Muhammad Mansour and Haitham Tabei contributed to this report.