BAGHDAD  American-trained Iraqi security forces failed for a third straight day to oust Shiite militias from the southern city of Basra on Thursday, even as President Bush hailed the operation as a sign of the growing strength of Iraq’s federal government.

The fighting in Basra against the Mahdi Army, the armed wing of the political movement led by the radical Shiite cleric Moktada al-Sadr, set off clashes in cities throughout Iraq. Major demonstrations were staged in a number of Shiite areas of Baghdad, including Sadr City, the huge neighborhood that is Mr. Sadr’s base of power.

Although Mr. Bush praised the Iraqi government for leading the fighting, it also appeared that the Iraqi government was pursuing its own agenda, calling the battles a fight against “criminal” elements but seeking to marginalize the Mahdi Army.

The Americans share the Iraqi government’s hostility toward what they call rogue elements of the Mahdi Army but will also be faced with the consequences if the battles among Shiite factions erupt into more widespread unrest.