* Authorities order detention for deposed president
* Army chief says he wants mandate to confront violence
* Seven dead in Egypt's second city, Alexandria
At least seven people were killed and hundreds wounded in scattered violence across Egypt during mass rallies for and against the army's overthrow of Islamist President Mohamed Mursi, who was placed under investigation for murder.
With hundreds of thousands taking to the streets on Friday, the new bloodshed deepened the turmoil convulsing the Arab world's most populous country, and could trigger a decisive move by the military against Mursi's Muslim Brotherhood.
Egypt's army-installed interior minister, Mohamed Ibrahim, said month-old Cairo vigils by supporters of the deposed leader would be "brought to an end, soon and in a legal manner," state-run al Ahram news website reported.
In the sprawling capital, huge crowds heeded a call by army chief General Abdel Fattah al-Sisi to give him a popular mandate to confront violence unleashed by his July 3 overthrow of Mursi, who remains in military detention.
Following Sisi's call, news of the investigation against Mursi over a 2011 jailbreak signalled an escalation in the military's confrontation with the deposed leader's Islamist movement.
The Brotherhood fears a broad crackdown to wipe out a movement that emerged from decades in the shadows to take power after Egypt's 2011 Arab Spring uprising against autocrat Hosni Mubarak, only to be deposed a year later by the powerful military.
In Egypt's second city Alexandria, on the Mediterranean coast, hundreds of people fought pitched battles, with birdshot fired and men on rooftops throwing stones at crowds below.
Seven people were killed, several of them stabbed, and more than 100 were wounded, the health ministry said. Several hundred were hurt in confrontations nationwide.
In Cairo, the pro-Mursi camp said one Brotherhood supporter had been killed when "thugs" opened fire with tear gas and rubber bullets. State media reported a clash with security forces, but did not say whether anyone had died and Reuters could not independently confirm what happened.
There is deepening alarm in the West over the army's move against Egypt's first freely elected president, which has triggered weeks of violence in the influential Arab state bordering United States ally Israel. Close to 200 people have died.
The country of 84 million people forms a bridge between the Middle East and North Africa and receives $1.5 billion a year in mainly military aid from Washington.
Fireworks lit up the night sky over Cairo's central Tahrir Square, packed by army supporters in jubilant mood.
In a sign of Sisi's rising political star, many demonstrators clutched posters of the general in uniform, some depicting him alongside former military officers who became Egyptian presidents, Gamal Abdel Nasser and Anwar Sadat.
"The Brothers stole our revolution," said Salah Saleh, a horse trainer at the Cairo rally, voicing widespread criticism that Mursi refused to share out power after taking office, and then failed to tackle Egypt's many problems.
"They came and sat on the throne and controlled everything."
The army has signalled it intends to get tough with the Islamists, and Interior Minister Ibrahim said authorities would act on complaints filed by Cairo residents against the Brotherhood vigils. Many thousands of men, women and children joined Brotherhood supporters at the group's main round-the-clock sit-in in northeast Cairo.
"It is either victory over the coup or martyrdom," senior Brotherhood politician Mohamed El-Beltagy told the pro-Mursi rally. "Our blood and our souls for Islam!" the crowds chanted.
The Brotherhood accuses the army and hired thugs of stoking trouble to justify a move against the Islamists.
In Cairo, helicopters repeatedly buzzed low over the pro-Mursi vigil before wheeling around Tahrir Square, and scattering Egyptian flags over the packed supporters.
"The Muslim Brotherhood has deviated from the path of real Islam," said Gamal Khalil, a 47-year-old taxi driver as his wife and two daughters waved flags at passing cars on a bridge over the Nile. "The army is the only honest institution in the country."
The investigation into Mursi centres on accusations that he conspired with the Palestinian Islamist group Hamas to escape from jail during the 2011 uprising, killing some prisoners and officers, kidnapping soldiers and torching buildings.
Mursi has said local people helped him escape during the upheavals, and the Muslim Brotherhood denounced the accusations levelled against him. Hamas challenged investigators to find "one piece of evidence" that it had meddled in Egyptian affairs.
"At the end of the day, we know all of these charges are nothing more than the fantasy of a few army generals and a military dictatorship," Brotherhood spokesman Gehad El-Haddad said. "We are continuing our protests on the streets."
State news agency MENA said Mursi, who has been held incommunicado since his overthrow, had been ordered detained for 15 days pending the inquiry. The interior minister said no decision had been taken on whether to move Mursi, who is being held at an undisclosed military facility.
Convulsed by political and economic turmoil, Egypt is polarised, struggling to make the transition from the autocratic rule of Mubarak, ousted in the 2011 uprising, to a free and open democracy.
One security source said the military wanted to calm the situation after realising that Sisi's call to rally was not well received abroad. A military statement on Facebook said the protests did not represent a threat to the Brotherhood.
State television screened images on Friday of the celebrations that erupted the night Sisi announced Mursi had been deposed. The narrator declared it "the day of liberation from the Brotherhood occupation".
"Egypt against terrorism," declared a slogan on the screen.
The army has appointed an interim government tasked with preparing for parliamentary elections in about six months followed by a new presidential vote. The Brotherhood says it will not join the process.