In Baghdad, Rice praised the efforts of Nuri al-Maliki, the prime minister, who told her that "security had improved" in Iraq.
"If it does not stop the militias that have infiltrated the government, then we will declare a war until liberation," he said.
The warning comes nearly four weeks after Iraqi forces launched a crackdown against Shia militia groups in Basra and Baghdad's Sadr City area.
The Mahdi Army, al-Sadr's own force, is concentrated in both the areas.
Al-Maliki launched a crackdown on Sadr's followers last month in the city of Basra, but fighting spilled out to other cities, leading to the worst fighting in Iraq in nearly a year at a time when the US is bringing home extra troops sent under last year's "surge" strategy.
Some leaders among both Sunnis and Shia suspect al-Maliki's aim in launching the Basra operation was to weaken Shia opponents before provincial elections this autumn.
Sheikh Salah al-Obaidi, a spokesman for al-Sadr, told Al Jazeera that this was the last opportunity of the Iraqi government to make an effort to co-operate with the group.
He said: "We [the Sadrist movement] have tried and tried to improve the political situation in the country.
"But our calls were never heeded. This is the government's last chance to correct the current situation."
Al Jazeera's Owen Fay said al-Sadr's latest threat might be a bluff - bluster from an increasingly isolated cleric who suffered a setback in Basra last month and is now losing support from his key backers in Iran.
But the Iraqi government cannot afford to treat the threat lightly as al-Sadr still commands thousands of fiercely loyal fighters who will not hesitate to take up arms should he demand it.
If he does carry out his latest threat, political progress in Iraq will suffer a significant setback and an end to the ceasefire will yield very bloody results, our correspondent said.
Amid the feuds within the Shia political camp, a leader of al-Qaeda in Iraq, an armed Sunni group, has announced that a one-month campaign will be launched, where the group will "offer the head of an American" as a gift to George Bush, the US president.
"This is the governments last chance to correct the current situation"
Sheikh Salah al-Obaidi,
According to an audiotape made public on Saturday, Abu Hamza al-Muhajir, also known as Abu Ayyub al-Masri, made the announcement in a speech entitled The Paths to Victory, monitored by the SITE Intelligence Group.
The campaign, to be called Attack of Righteousness, was reportedly announced in "celebration" of the 4,000 US troops who have died in Iraq.
Al-Masri, who was born in Egypt, is regarded by US commanders as the real leader of al-Qaeda in Iraq although the group claims it is led by an Abu Omar al-Baghdadi, an Iraqi.
In his statement on Saturday, al-Sadr accused the Iraqi government of being too close to the US military.
"The occupation has made us target of its planes, tanks, air strikes and snipers. Without our support this government would not have been formed," he said.
"But with its alliance with the occupier [the Iraqi government] is not independent and sovereign as we would like it to be."
Hasan Kazemi Qomi, the Iranian ambassador to Iraq, also criticised the US military for raids in Sadr City.
|Al-Sadr has threatened 'open war' against the|
US-backed Iraqi government [GALLO/GETTY]
"We are encouraging the [Iraqi] government to fight the outlaws," he said.
"But we are against the way the Americans are implementing the policy by bombing and closing down Sadr City. In this way people are suffering.
"The wrong policy of Americans by bombing innocent people will yield bad results."
But within the Iraqi government there have been signs of greater political unity.
Massoud Barzani, who heads the Kurdish self-ruled northern region of Iraq, has offered Kurdish troops to help battle Mahdi Army fighters.
Tariq al-Hashemi, the Sunni Arab vice-president, has signed off on a statement by Jalal Talabani, the country's Kurdish president, and Adil Abdul-Mahdi, the Shia vice-president, that expressed support for al-Maliki's Basra crackdown.
The statement was significant as al-Hashemi has been one of al-Maliki's most bitter critics.
A statement form al-Maliki's office on Sunday called the Basra crackdown a "strong blow" and said the Iraqi parliament had "started serious consultations with the Tawafiq Front [Sunni Bloc] over returning to the national unity government".
Al Jazeera's correspondent in Baghdad said Rice's plans to promote greater Iraqi unity would be severely under cut by security threats from the Mahdi Army and al-Qaeda in Iraq.
Rice is hoping to show the Iraqi government and politicians that they can be rewarded if they have some success working together.
She is also trying to illustrate to Iraq's neighbours that now is the time to get more engaged in the country - to get involved in greater debt relief and to send ambassadors back to open up more diplomatic channels.
But her efforts amid Shia and Sunni groups announcing they may be on the verge of launching fresh offensives illustrates that US policy is not working as well as Rice would like other countries to believe, our correspondent said.
Rice last visited Baghdad on January 15, when she praised "remarkable" political progress in Iraq, saying it represented a time of hope for the country.
She was followed in mid-March by Dick Cheney, the US vice-president, who vowed the US would stay the course in Iraq as he urged Arab states to open full diplomatic ties with Baghdad if they want to counter Iranian influence.