Republicans and Democrats each share some of the blame for the situation in Iraq -- the former for the way in which the United States entered the country and the latter for the way in which it left. It was only between 2007 and 2009 that the United States had a coherent strategy in Iraq, matched with the right leadership and the necessary resources. The current turmoil dates back to just after that period, to 2010, after Iraq's second post-Saddam national election.
At that time, some senior officials argued that the United States should uphold the constitutionally mandated right of the winning bloc, Iraqiya, headed by Ayad Allawi, to have the first go at trying to form a government. They maintained that the United States should actively help broker an agreement among Iraqi elites to form the new government and warned of the already apparent autocratic tendencies of Nouri al-Maliki, the incumbent prime minister.
Other officials argued that Maliki, despite his narrow electoral defeat, was the only conceivable Shia leader who could hold the position. He was also, they said, a friend of the United States who would agree to allow the United States to maintain a small contingent of forces in Iraq after 2011, when the existing agreement between the two countries expired. In the end, it was Iran that stepped in and, by pressuring the Sadrists to support Maliki, secured him a second premiership. The price Iran extracted from Maliki was his support for the removal of all U.S. forces.
Since 2010, Maliki has consolidated his power by targeting his political rivals, subverting the judiciary and independent government commissions, reneging on his promises to the Sunni tribal leaders who had helped him fight al Qaeda, and politicizing the security forces that the United States invested so much in training. He also mishandled the yearlong protests against his government that erupted in Sunni areas at the end of 2012, following the souring of relations between him and Rafi al-Issawi, the highly respected minister of finance.