President Mohamed Morsi has said he "disliked" imposing a state of emergency on three Suez Canal cities, but he had to protect citizens against escalating violence.
He made the comments during a meeting with members of the Egyptian community in Berlin.
Thugs shot at a military helicopter from the roof of Port Said prison, Morsi said, citing it as a reason for the emergency measures.
There have been numerous attempts to smuggle large numbers of heavy weapons and missiles into the country, he added.
On Sunday, Morsi announced a month-long state of emergency in Ismailia, Suez and Port Said, after days of deadly unrest. Protesters have defied the curfew with marches and rallies.
Commenting on his detention during Egypt's revolution, Morsi said relatives of prisoners opened Wadi Al-Natroun prison (north of Cairo) where he was being held, not members of Hamas, as some have claimed.
Prisoners risked death from the amount of tear gas used during the prison break, he added.
Morsi was arrested several times during the Mubarak era.
He spent seven months in jail for protesting against the repressive measures and oppressive practices of the old regime.
During the revolution, Morsi and other Brotherhood leaders were arrested. When the prison was opened, Morsi refused to leave. Instead, he contacted satellite TV channels and news agencies to demand the authorities visit the prison and consider the legal position of the jailed Muslim Brotherhood members.
President Morsi visited the German capital on Wednesday in a shortened visit to seek support for Egypt's crumbling economy.