* Sunni Mufti says crisis needs serious, immediate treatment
* Rapid deterioration in Lebanon sparks international concern
* With medicines running out, cancer patients protest
* Security chief says state institutions undermined by collapse (Recasts with sermon from Sunni mufti)
BEIRUT, Aug 27 (Reuters) - Lebanon is heading towards complete collapse unless action is taken to remedy the crisis caused by its financial meltdown, Grand Mufti Sheikh Abdul Latif Derian, the state's most senior Sunni Muslim cleric, warned on Friday.
The economic collapse that began in 2019 has plumbed new depths this month, leading to fuel shortages that have crippled even essential services and causing numerous security incidents involving scrambles for gasoline.
The head of one of the main security agencies, Major General Abbas Ibrahim, ordered his officers to stand firm in the face of the crisis, saying it could be protracted and warning of the chaos that would ensue if the state collapsed.
The warnings are some of the strongest yet from Lebanese officials about the gravity of the situation.
The accelerating pace of the deterioration has added to international concern about a state that was pieced back together after a 1975-90 civil war and is still deeply riven by sectarian and factional rivalries.
The U.N. secretary general on Thursday called for a new government to be formed urgently.
Lebanese politicians have failed to agree on the government even as the currency has lost more than 90% of its value and more than half of Lebanese have fallen into poverty.
Even vital medicines are hard to find. Cancer patients who have been told their treatment cannot be guaranteed protested on Thursday.
"We fear that ... the patience of Lebanese will run out and that we will all fall into the furnace of complete chaos, manifestations of which we have started to see in all fields," Sheikh Derian said during a Friday sermon in comments carried by the National News Agency.
"The matter requires serious and immediate treatment," he said. "Otherwise we are truly going to what is worse and to complete collapse," he said, noting clashes that have flared up in some parts of Lebanon.
The World Bank says it is one of the worst collapses ever recorded. Its root causes include decades of corruption in government and the unsustainable way the state was financed.
Foreign donors say they will provide assistance once a government is formed that embarks on reforms.
"THE EYE OF CHAOS"
President Michel Aoun, a Maronite Christian, and Prime Minister-designate Najib Mikati, a Sunni Muslim, have yet to agree on a cabinet to replace the government that quit after last year's Beirut port explosion.
The already difficult process was overshadowed on Friday by a row between Aoun and a group of former prime ministers, including Mikati and Saad al-Hariri, over the probe into the explosion.
The former premiers have objected to attempts by the investigating judge to question the caretaker Prime Minister Hassan Diab, seeing it as an unjustified move against a post reserved for a Sunni and accusing the presidency of steering the probe. Aoun said the accusations were unfortunate.
Mikati was designated premier after Hariri abandoned a nine-month-long bid to form the government, saying he could not agree with Aoun and accusing him of seeking effective veto power in cabinet. Aoun, an ally of the heavily armed, Iran-backed Shi'ite group Hezbollah, has denied this. He blamed Hariri.
Grand Mufti Derian, who generally aligns with the former prime ministers in politics, urged Aoun to try to save what was left his term.
"Otherwise we are going to ... to the bottom of hell," he said, recalling Aoun's warning last September that Lebanon was going to hell if a government was not formed.
Major General Ibrahim, in a message to personnel at General Security, said state institutions had been undermined by "the great collapse".
Were the state to fall it would fall on everyone "and everyone will be in the eye of chaos and in the line of tension".
(Writing by Tom Perry; editing by Maha El Dahan and John Stonestreet)