Egyptian police arrested ousted Islamist president Mohamed Morsi's former prime minister as tensions rose after a major car-bomb attack on a police building killed 15 people.
The interior ministry said ex-premier Hisham Qandil, who is facing jail after being convicted of failing to respect a court ruling while in office, was arrested in the desert outside Cairo with a "smuggler attempting to escape to Sudan".
An unpopular prime minister who struggled to right a dire economy, Qandil has kept a relatively low profile since the military overthrew Morsi in July.
He represented an alliance of pro-Morsi Islamist groups in meetings with European mediators who tried to defuse tensions with the military-installed government.
The efforts failed in August, with the police launching a massive crackdown that killed more than 1,000 people in street clashes.
In April, while still in office, Qandil was sentenced to a year in prison for not carrying out a ruling to re-nationalise a company that had been privatised in 1996. An appeals court upheld the sentence in September.
Qandil's arrest followed an early-morning car bombing outside the police headquarters in the Nile Delta city of Mansoura that killed at least 15 people, including at least 12 policemen.
The explosion, which the country's military-installed authorities suggested was carried out by Morsi's Muslim Brotherhood, was one of the deadliest since the Islamist leader's ouster, which has bitterly polarised the country.
The Muslim Brotherhood condemned the bombing "in the strongest possible terms".
Analysts said the attack was likely the work of more radical Islamists, who have carried out a string of similar attacks in the Sinai peninsula targeting security forces.
Investigators say they suspect a suicide bomber rammed a car loaded with powerful explosives through barriers surrounding the building.
The explosion peeled off part of the building's facade and could be felt up to 20 kilometres (12 miles) away.
Casualties were rushed to a nearby hospital, where one witness told AFP the blast had sent him flying through the air.
"I heard a massive explosion behind me. I flew through glass and wreckage and then lost consciousness," he said from his stretcher, his head swathed in bandages.
Hours after the bombing, prime minister Hazem Beblawi labelled the Brotherhood a "terrorist" group, but did not blame the organisation for the blast.
Signup to our newsletter and follow us on Facebook and Twitter!
Later, thousands turned out at a funeral for the victims, whose corpses, shrouded in white and Egyptian flags, were carried on fire engines through chanting crowds.
Ahmed Fouad, a policeman who lost two comrades in the attack, said "I go to work every day not knowing whether I'll return."
Crowds torched a bus belonging to a tourism company, saying its employees had made pro-Islamist salutes, and then ransacked a supermarket believed to belong to Muslim Brotherhood sympathisers.
"The Muslim Brotherhood is an international terrorist organisation. They are responsible for what happened in Mansoura," said teacher Hamada Arafat.
Interior minister Mohamed Ibrahim said the explosion was meant to "terrorise" people ahead of a constitutional referendum next month billed as the first step in the democratic transition after Morsi's overthrow, to be followed by fresh elections.
The deadliest violence since Morsi's ouster has been in the Sinai peninsula bordering Israel and Gaza, where militants have killed more than 100 police and soldiers.
Shadi Hamid, research director at the Brookings Doha Center, said the latest attack indicated the insurgency was intensifying.
"This is a more sophisticated attack than previous ones. It could be a sign of things to come.... The insurgency in Sinai is becoming emboldened and extending attacks outside the Sinai," Hamid said.
Morsi and other Islamists face trial for having allegedly colluded with militants to launch attacks in the country.
The interim presidency declared three days of mourning after the explosion, and said the security forces would "avenge our martyrs".
US State Department spokeswoman Jen Psaki condemned what she called a "terrorist attack".
The Brotherhood, Egypt's most well-organised opposition movement during decades of dictatorship, prevailed in polls following the overthrow of longtime dictator Hosni Mubarak in 2011.
Morsi became Egypt's first freely elected leader after winning elections last year, but was removed from power after massive protests against his turbulent rule.
More than 2,000 Islamists have been arrested since Morsi's overthrow, virtually the entire top leadership of the Muslim Brotherhood.
The United Nations on Tuesday called for the immediate release of prisoners detained over peaceful protests.
UN chief Ban Ki-moon said convicting activists for organising peaceful protests was "contrary to the spirit of Egypt's revolution".