* Aoun does not rule out bomb, though negligence also suspected
* Highly explosive material stored at port for years
* Israel swift to deny role, Turkey compares blast to 2005 bomb
* Blast could cost already bankrupt Lebanon up to $15 billion
* Working through night, rescuers hunt for more survivors
* Hezbollah leader suggests negligence and corruption at fault (Adds port official detained)
By Michael Georgy and Ellen Francis
BEIRUT, Aug 7 (Reuters) - Lebanon's president said on Friday its investigation into the biggest blast in Beirut's history would examine whether it was caused by a bomb or other external interference, as residents sought to rebuild shattered homes and lives.
Rescuers sifted rubble in a race to find anyone still alive after Tuesday's port explosion that killed 154 people, injured 5,000, destroyed a swathe of the Mediterranean city and sent seismic shockwaves around the region.
"The cause has not been determined yet. There is a possibility of external interference through a rocket or bomb or other act," President Michel Aoun told local media.
Aoun, who had previously said explosive material was stored unsafely for years at the port, said the investigation would also weigh if the blast was due to negligence or an accident. Twenty people had been detained so far, he added.
One source said an initial probe blamed negligence.
While the United States has said it did not rule out an attack, Israel, which has fought several wars with Lebanon, has denied any role. Turkish President Tayyip Erdogan said the cause was unclear, but compared the blast to a 2005 bombing that killed former Prime Minister Rafik al-Hariri.
Sayyed Hassan Nasrallah, leader of Lebanon's powerful Shi'ite group Hezbollah, denied what he said were "preconceived" comments both domestically and abroad that the Iran-backed group had arms stored at the port.
He called for a fair investigation and strict accountability for anyone responsible without any political cover.
"Even if a plane struck, or if it was an intentional act, if it turns out this nitrate had been at the port for years in this way, it means part of the case is absolutely negligence and corruption," he said.
The customs director and a predecessor were arrested later on Friday.
At Beirut's Mohammad Al-Amin mosque, next to Hariri's grave, chief cleric Amin Al Kurdi told worshippers in a Friday sermon that Lebanese leaders bore responsibility.
"Who is the criminal, who is the killer behind the Beirut explosion?" he said. "Only God can protect, not the corrupt ... The army only protects the leaders."
Security forces fired tear gas at a crowd in Beirut on Thursday, as anger boiled over at the ruling elite, who have presided over an economic collapse. The small crowd, some hurling stones, marked a return to the kind of protests that had become a feature of life as Lebanese watched their savings evaporate and currency disintegrate, while government decision-making floundered.
'WHERE IS THE STATE?'
"There is no way we can rebuild this house. Where is the state?" said Tony Abdou, an unemployed 60-year-old.
His family home is in Gemmayze, a district a few hundred metres from the warehouses where 2,750 tonnes of ammonium nitrate were stored for years near a densely populated area.
A security source and local media previously said the fire that caused the blast was ignited by welding work.
Volunteers swept up debris from the streets of Beirut, which still bears scars from a 1975-1990 civil war.
"Do we actually have a government here?" said taxi driver Nassim Abiaad, 66, whose cab was crushed by wreckage as he was about to get in. "There is no way to make money anymore."
For many, the explosion was symptomatic of years of neglect and corruption. "The problem is this government and all governments before it," said Dr. Mohammed Kalifa, 31.
Officials have said the blast, whose impact was recorded hundreds of miles (kms) away, might have caused losses amounting to $15 billion. That is a bill Lebanon cannot pay after already defaulting on a mountain of debt - exceeding 150% of economic output - and with talks stalled on a lifeline from the International Monetary Fund.
Hospitals, many heavily damaged as shockwaves ripped out windows and ceilings, have been overwhelmed.
"I lived through part of the civil war. I saw people being shot in front of me. But never has there been such a horror," said Dr. Assem Al Hajj at Beirut's Clemenceau hospital, which he said had treated 400 victims.
HUNTING THE MISSING
As exhausted rescuers combed wreckage to find any survivors, grieving families camped outside the port where their loved ones were last seen. Some victims were hurled into the sea because of the explosive force.
"We would like to go inside the port to look for my son but we can't get permission," said Elias Marouni, describing his son George, a 30-year-old army officer.
One weeping mother called a prime-time TV programme to plead with authorities to find her son, Joe. He was found hours later: dead.
Dozens are still unaccounted for.
In Beirut's Karantina district, a Polish rescue team took a break near a once three-storey building that was completely flattened. One woman and her two teenage daughters were killed, a neighbour said.
Charbel Abreeni, who trained port employees, showed Reuters pictures on his phone of killed colleagues. He was sitting in a church where the head of a Virgin Mary statue was blown off.
"I know 30 port employees who died, two of them are my close friends and a third is missing," said the 62-year-old, whose home was wrecked and his shin wrapped in a bandage.
"I have nowhere to go except my wife's family," he said. "How can you survive here? The economy is zero."
After the blast destroyed Lebanon's only major grain silo, U.N. agencies helped provide emergency food and medical aid.
Aid offers have also poured in from Arab states, Western nations, the Vatican and beyond. But none, so far, addresses the bigger challenges facing a bankrupt nation.
(Reporting by Michael Georgy, Ellen Francis and Ghaida Ghantous in Beirut; Writing by Ghaida Ghantous Editing by Andrew Cawthorne, Nick Macfie and Matthew Lewis)
Our Standards: The Thomson Reuters Trust Principles.