* Authorities order detention for deposed president
* Army seeks "mandate" to confront violence
* At least nine people killed in protest violence
* Islamists fear broad military crackdown (Updates Brotherhood account of violence, paragraph 6)
By Yasmine Saleh and Matt Robinson
CAIRO, July 27 (Reuters) - At least nine people were killed in heavy fighting in Egypt during rival mass rallies for and against the army overthrow of President Mohamed Mursi, who was placed under investigation for murder in an escalating showdown with his Islamist backers.
The bloodshed deepened the turmoil convulsing the Arab world's most populous country, and may trigger a decisive move by the military against Mursi's Muslim Brotherhood three weeks after it was shunted from power.
In the sprawling capital, hundreds of thousands of Egyptians heeded a call by army chief General Abdel Fattah al-Sisi to hit the streets and give him a popular mandate to confront violence unleashed by his July 3 overthrow of Egypt's first freely elected president.
The Brotherhood mounted counter-demonstrations, swelling a month-long vigil in northern Cairo before violence erupted. A Reuters reporter saw heavy exchanges of gunfire in the early hours of Saturday between security forces and Mursi supporters, who tore up pavement concrete to lob at police.
Clouds of teargas filled the air.
Quoting an unnamed security official, the MENA state news agency reported nine people killed in violence nationwide and at least 200 wounded. A spokeswoman for the pro-Mursi camp said eight Brotherhood supporters had died in the clash near the north Cairo vigil alone, and another said rooftop snipers had opened fire. Reuters could not independently verify the accounts.
Of the official death toll, most occurred in Egypt's second city of Alexandria, on the Mediterranean coast, where hundreds of people fought pitched battles, with birdshot fired and men on rooftops throwing stones at crowds below.
Several of those killed were stabbed, hospital officials said, and at least one was shot in the head.
Following Sisi's summoning of protests, news of the investigation against Mursi over his 2011 escape from jail signalled a clear escalation in the military's confrontation with the deposed leader and his Islamist movement.
MENA said Mursi, who has been held incommunicado at an undisclosed military facility since his overthrow, had been ordered detained for 15 days pending the inquiry.
Egypt's army-installed interior minister, Mohamed Ibrahim, said month-old Cairo vigils by Mursi supporters would be "brought to an end, soon and in a legal manner," state-run al Ahram news website reported.
On Facebook, the Brotherhood said the army had stormed its vigil overnight, triggering the violence. An army official, who declined to be named, denied this. He said the clashes were "near the Brotherhood's sit-in area, but not at it. There is and will not be any attempt to attack the sit-in or evacuate it tonight."
SISI'S RISING STAR
The Brotherhood is bracing for a broad crackdown by the army 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 after a year in government.
There is deepening alarm in the West over the army's move against Mursi, which has triggered weeks of violence in the influential Arab state bordering U.S. 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, where army supporters rallied clutching posters of Sisi in full ceremonial uniform.
In a sign of the general's rising political star, many of the posters depicted him alongside Gamal Abdel Nasser and Anwar Sadat, former military officers who went on to become presidents of Egypt.
"The Brothers stole our revolution," said Salah Saleh, a horse trainer at the Cairo rally, voicing widespread criticism that Mursi refused to share power after taking office, and then failed to tackle Egypt's many problems.
"They came and sat on the throne and controlled everything."
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.
Helicopters repeatedly buzzed low over the pro-Mursi vigil before flying around Tahrir Square, 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. "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."
Convulsed by political and economic turmoil, Egypt is deeply polarised, struggling to make the transition from the autocratic rule of Mubarak to a free and open democracy.
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. (Additional reporting by Shadia Nasralla, Yasmine Saleh, Tom Perry, Noah Browning, Tom Finn, Maggie Fick, Omar Fahmy, Edmund Blair, Michael Georgy and Ahmed Tolba in Cairo, Abdel Rahman Youssef in Alexandria and Yusri Mohamed in Ismailia,; Writing by Matt Robinson; Editing by Eric Beech)