BAGHDAD (Reuters) - Secretary of State Condoleezza Rice backed Iraq’s crackdown on militias in a visit on Sunday to Baghdad, where the worst fighting in weeks killed 23 after Shi’ite cleric Moqtada al-Sadr threatened all-out war.

Rockets blasted the fortified Green Zone compound where Rice met Prime Minister Nuri al-Maliki and other officials and praised their month-old campaign against Sadr’s followers.

She had harsh words for the reclusive cleric, who on the eve of Rice’s visit vowed “open war” if the crackdown continues. Sadr has not appeared in public in Iraq in nearly a year.

“He is still living in Iran. I guess it’s all out war for anybody but him,” Rice told reporters. “His followers can go to their death and he will still be in Iran.”

Sadr’s reply came in a statement sent to reporters, condemning Rice’s visit and saying the government should not admit such “occupier terrorists into our pure land”.

The U.S. military described a night of gunbattles and helicopter missile strikes that killed 23 fighters in east Baghdad’s Sadr City slum and other militia strongholds.

“I would say it’s been the hottest night in a couple of weeks,” spokesman Lieutenant-Colonel Steven Stover said.

Rice said she supported what she called a new political “centre” that has backed Maliki’s anti-militia campaign.

“It is indeed a moment of opportunity in Iraq thanks to the courageous decisions taken by the prime minister and a unified Iraqi leadership,” Rice said in brief televised remarks with President Jalal Talabani after they held talks.

A rebellion by Sadr’s Mehdi Army militia -- whose tens of thousands of black-masked fighters control the streets in many Shi’ite areas -- could abruptly end a period of lower violence at a time when some U.S. forces are starting to leave Iraq.

Mehdi Army fighters, who have bristled at past truces, could barely hide their glee at the prospect of open conflict.

“We are very happy and eager. We are waiting for the end of the ceasefire,” a street commander in Sadr City who goes by the name Abu Hassan told Reuters.

Ordinary residents of the slum say they have been living in constant terror for weeks as nightly battles between Sadr fighters and U.S. and Iraqi forces killed and wounded hundreds.

Slideshow ( 21 images )

“The bombing and shooting, it reminds me of the 1991 Gulf War,” said student Bashar Mehdi. “I saw a man with his daughter get shot by a sniper. The man was killed and we had to carry the daughter to the hospital.”

Rice told reporters she did not know how seriously to take Sadr’s threat of war, released in a statement on his website.

Sadr’s threat dramatically raises the stakes in his confrontation with Maliki, who has threatened to ban Sadr’s movement from political life unless he disbands his militia.

Slideshow ( 21 images )

ROCKETS HIT GREEN ZONE

Maliki’s crackdown has led over the past month to Iraq’s worst fighting in nearly a year, spreading through the south and Shi’ite parts of Baghdad. Although fighting in the south has mainly died down, the Baghdad clashes have continued unabated.

Maliki’s crackdown has been backed by parties across Iraq’s sectarian and ethnic divide apart from the Sadrists themselves. Rice said this support signaled a “coalescing of a centre in Iraqi politics” that was working together better than ever.

As Rice met Maliki and other ministers, rockets could be heard hitting the Green Zone government and diplomatic compound where the prime minister has his office. Rice left the meeting about five minutes after an all-clear signal was given.

Washington says the rockets are fired from Sadr City by rogue elements of the Mehdi Army that it says are armed, trained and funded by Iran. Tehran denies responsibility.

Maliki’s initial operation last month in the southern city of Basra went poorly, and U.S. commanders have acknowledged it was carried out hastily and badly planned.

Since then, however, the government forces have moved more carefully into Basra, and on Saturday they took control of the neighborhood that had been the Mehdi Army’s main stronghold.

Sadr has pivoted back and forth between armed confrontation and peaceful politics throughout the five years since the U.S.-led invasion, while remaining hugely popular and staunchly hostile to the American presence.

He led two anti-American uprisings in 2004, but joined the political bloc that won parliamentary elections in 2005 and installed Maliki. Last year his followers quit the government for failing to demand an American withdrawal, but then Sadr abruptly declared a ceasefire, winning Washington’s praise.

As his stance has changed, so has the response of American leaders. In 2004 they issued a warrant for his arrest, but more recently they praised his ceasefire and started referring to him with the respectful Arabic honorific “Sayyed”.