The violence is Basra is clearly a "shaping" operations for the upcoming provincial elections, but that is only part of the story.
This is what I think happened. In February, Abdul Mehdi, the ISCI VP, nixed the provincial powers law that set up provincial elections. Why? In part because ISCI (very pro-federalist) thought the law did not give enough power to provincial governors. But, as many observers have noted, ISCI is very concerned that provincial elections will empower the Sadrists/JAM in southern Iraq, where ISCI/Badr currently controls "official" power but JAM owns the street. Then, suddenly, Cheney flies to Iraq, meets with Hakim and others, and ISCI withdraws its opposition to the provincial powers law. Elections back on, but the JAM problem remains. Was there a quid-pro-quo to greenlight an Iraqi Army/Badr offensive to clean out JAM from Basra to pave the way for ISCI doing better in the elections? I don't know. But whether there was or not, this is clearly the logic driving Maliki's decision. About a week before the Basra offensive began, General Mohan, the Iraqi leading the operation, basically admitted that this was the objective.
The question is why now? There is *no way* the adminstration wanted this to happen before the Petraeus testimony and, despite my Cheney conspiracy theory, they may not have wanted it to happen at all. I think they (and MNF-I) really were caught with their pants down and have very poor intelligence about the south (a huge indictiment of our neglect of intra-Shia dynamics in-and-of-itself). There is also some evidence that the Iraqi Army was caught by surprise--they appear to have thought the offensive was going to happen in June, but Maliki told them to go now. Why? Well, looking back at the week or so before the Basra operaton, JAM was stepping out in Kut and elsewhere in the south-central portion of the country (the Shia heartland) and there were whispers that the ceasefire might break down in Baghdad. One hypothesis is that Maliki (and ISCI) accelerated the operation in Basra as a pre-emptive strike, figuring it would be even harder to dislodge JAM if they waited. In doing so, they may have created a self-fulfilling spiral with JAM. And, if the offensive in Basra fails to dislodge JAM but succeeds in derailing the Sadr ceasefire, Iraq is going to get caught in a Shia-on-Shia death spiral.
Bottom-line: Recent violence shows that the gains of the surge are fragile, but that fragility is *not* a consequence of the size of our troop presence, but rather a failure to address the fundamental political disputes that motivate the combatants on all sides of the sectarian and intra-sectarian divide(s). Much of the recent progress is a result of the combatants deciding to take a "time-out" rather than representing a permanent turning point. The only pathway to lasting success is political accommodation. No number of U.S. troops can keep a lid on things if the combatants all decide to come out to play. Basra (and increasingly Baghdad) demonstrate that in spades.