The stunning and defiant display of militia strength underscored the weaknesses of the Iraqi security forces and the potency of the Mahdi Army, which had been able to operate virtually unchecked in Iraq.