Ali al-Sistani urged Iraqis "of different sects and ethnic groups" to wake up to the "danger threatening the future of the country" and stand "side-by-side against it".
In a rare statement, the grand ayatollah said the time has come for "all those who value the unity and future of this country" to "exert maximum efforts to stop the bloodletting".
Al-Sistani urged Iraqis against "falling into the trap of sectarian and ethnic strife", which he said would only delay the departure of American and other foreign troops.
He said: "I repeat my call today to all Iraqis of different sects and ethnic groups to be aware of the danger threatening the future of the country and stand side by side against it."
Al-Sistani's comments came as Major-General William Caldwell, a US military spokesman, said there had been an average of 34 attacks a day against US and Iraqi forces in the capital since last Friday.
This was up from the daily average of 24 registered between June 14 and last Thursday.
Caldwell said: "We have not witnessed the reduction in violence one would have hoped for in a perfect world.
"The only way we're going to be successful in Baghdad is to get the weapons off the streets."
Caldwell said insurgents were streaming into the capital for "an all-out assault against the Baghdad area".
He said: "Clearly the death squad elements, the terrorist elements, know that Baghdad is a must-win for them.
"Whoever wins the Baghdad area, whoever is able to bring peace and security to that area, is going to set the conditions to stabilise this country."