Speaking on live television through an aide in the holy southern city of Kerbala, Sistani asked rhetorically what would happen if the military were corrupt.
Grand Ayatollah Ali al-Sistani's comments show how the threat posed by ISIL has pushed some Shi'ites and Sunnis to overcome their sectarian differences and face a common enemy
Sistani said that politicians who cling to their posts are making a "grave mistake", piling pressure on Shi'ite Prime Minister Nuri al-Maliki to drop his bid for a third term.
Grand Ayatollah Ali al-Sistani said leaders should show flexibility so that political deadlocks could be broken and Iraq could confront militants.
Ban's meeting with Shi'ite Grand Ayatollah Ali al-Sistani underscored the 83-year-old cleric's vast sway in Iraq, where Prime Minister Nuri al-Maliki is considered a polarising figure
In the first explosion, a car bomber drove into a police checkpoint, killing nine people including seven policemen and wounding 21 people in the Abu Dsheer district in the south of the capital
The United Nations say more than 2 million people have been displaced within Iraq, most of them forced from their homes by conflict in the western province of Anbar
Sistani on Friday reiterated his call for the new government to have "broad national acceptance", a formulation many officials have interpreted as a signal Maliki should step aside.
Reports state that up to 45 people have been killed in the Shiite Muslim holy city of Karbala, Iran in clashes between supporters of a religious leader and Iraqi police.
Grand Ayatollah Ali Sistani's means the fate of Prime Minister Nuri al-Maliki could be decided within days.
A sermon by Sistani, highest religious authority for the country's Shi'ite Muslims, was read out by his representative Sayed Ahmed al-Saafi at the Imam Hussein shrine in Kerbala.
Grand Ayatollah Ali al-Sistani, who is the highest religious authority for the Shi'ites in Iraq, said people should unite to fight back against advancing militants from the Islamic State of Iraq and the Levant
Nouri al-Maliki is seeking a third term as prime minister
The Turkish Foreign Minister Ahmet Davutoglu spoke of Turkey's willingness to contribute to the stabilization process in Iraq.