He instructed his followers to “to wage open war against the Americans” but forbade them from “raising a hand against another Iraqi citizen.” He also urged the Iraqi Army and Iraqi police to stop cooperating with the Americans, and he asked the government to purge the militias within the ranks of the police and the army. He said he would oppose any American military bases in Iraq.

He also issued a “final warning” to the Iraqi government to end its crackdown or face an “open war until liberation.”

But he quickly softened the threat, saying, “If we have threatened with an open war until liberation, we have meant by it a war against the occupier.”

The very public effort to calm the situation follows nearly a month of open fighting in Sadr City, Basra and several provinces in southern Iraq. It appeared to reflect an effort by Mr. Sadr to ensure that his movement is able to compete effectively in local elections scheduled for October.

Image Shiite women walked home after Friday Prayer in Sadr City. Credit... Moises Saman for The New York Times

Mr. Sadr and his allies have a strong following in Basra and could be expected to fare well in the elections. They have accused Prime Minister Nuri al-Maliki, who is allied with rival Shiite factions, of staging the Basra attack as a way to marginalize them before the vote.