Egypt's former president transported to military hospital in Cairo suburb, where he will be held under house arrest

Egypt's former president Hosni Mubarak was released from prison on Thursday and transported to a military hospital in a Cairo suburb, where he will be held under house arrest, according to state TV.

Crowds of the ousted dictator's supporters stood in wait for hours outside Tora prison waiting to see him spirited away by helicopter in a deft departure, clearly designed to avoid the divisive former leader being exposed to public view.

The terms of Mubarak's release were announced under Egypt's emergency law, enacted under the security crackdown on Islamists. The final say on where Mubarak will be going rests with Hazem Beblawi, the prime minister in the military-backed interim government.

Egyptians angered at the army's removal of the democratically elected but deeply unpopular president, Mohamed Morsi, will be infuriated by the coincidence of his unelected and autocratic predecessor walking free.

But on the streets of Cairo, the overall mood appears to be indifference, with many ordinary people saying that the former president is irrelevant to Egypt's current situation.

Hamid, a clerical worker, said: "Mubarak belongs to the past. But it is important to respect the law … [the armed forces chief, General Abdel Fatah] al-Sisi is smart to put him under house arrest. It shows that he is a wise leader."

The release comes at a volatile moment for Egypt after some 900 Islamist protesters were killed last week and the military-backed government continues its crackdown on the Muslim Brotherhood. Around 100 police and army personnel have also died.

Jubilant supporters have already launched a Facebook page to promote Mubarak's candidacy for the presidency next year.

Overthrown in January 2011 at one of the early high points of the Arab spring, Mubarak has spent the past two years in detention and could be detained again. But his release is loaded with symbolism about the parlous state of Egypt and fading hopes for peaceful political change across the wider region – graphically underlined by the latest carnage in Syria.

Mubarak remains on trial for murder over the deaths of more than 800 protesters during the uprising against him. But after a separate corruption charge was settled this week, the time limit for him to remain in custody had expired.

Egyptian officials had acknowledged privately that freeing Mubarak in this highly charged atmosphere was likely to fuel tensions. "The government knows that if Mubarak is freed there will be public outrage," said Mohamed Abolghar, head of the Egyptian Social Democratic party. "But a court decision is a court decision."

By keeping Mubarak under house arrest, Egyptian leaders may be trying to show they will not be too lenient with him to avoid angering the many Egyptians who held mass protests that led to the end of his rule in 2011.

The hearing that produced Wednesday's ruling was held in Tora prison, where Mubarak, 85 and in poor health, has spent most of his detention.

He was given a life sentence last year for failing to stop the killing of protesters but that was overturned on appeal and he is being retried. He also faces other corruption charges but no other trial dates have been set.

Most Egyptians have stopped following the legal twists and turns of the case but the significance and timing of this decision is still stunning. Saudi Arabia, dismayed that the US had abandoned Mubarak, is said to have been lobbying hard behind the scenes to have him freed. The Saudis helped put together a $12bn (£7.5bn) aid package for Egypt after Morsi was deposed last month.

Sherief Gaber, of the Mosireen collective, a pro-revolutionary group, said: "The symbolism is clear coming from a completely revanchist judiciary, that even the symbolic victory of imprisoning Mubarak will be revoked, that the counter-revolution and the old regime are feeling empowered and petty.

"The judiciary and the police are the two institutions that are most entrenched and most a part of the old regime; they were on their heels for a while, but using the bogeymen of the Muslim Brotherhood and people's fear and exhaustion, they're just doing whatever they feel like to be personally spiteful and cruel even.

"Mubarak after all was just a symbol, and we knew that the regime was much bigger and had not yet fallen but needed to (and still needs to)."

The news prompted bitter reflections about the state of the Arab world two-and-a-half years after the uprisings in Egypt, Syria, Tunisia and Yemen. "Give it five months and Mubarak, Assad, Ben Ali and Ali Saleh will hold a summit for the sake of good ol' days," tweeted Hassan Hassan, a Syrian commentator.