Washington (CNN) -- President Obama's former defense secretary, Leon Panetta, says if the White House had listened to his advice on U.S. troop levels in Iraq, the country's security situation may not have unraveled.
"To this day, I believe that a small U.S. troop presence in Iraq could have effectively advised the Iraqi military on how to deal with al-Qaeda's resurgence and the sectarian violence that has engulfed the country," Panetta writes in his upcoming autobiography, due out next week.
President Obama announced in October 2011 that virtually all of the 39,000 U.S. troops would leave Iraq by the end of that year. Obama had said that it was a fulfillment to his 2008 campaign promise to bring troops in Iraq home. But at the same time, talks to get the Status of Forces Agreement, which provided immunity from prosecution to those troops, were at a standstill due to the internal politics of Iraq.
Panetta, who said he argued behind the scenes and publicly for a small amount of troops to be left for additional training for Iraq's military, was frustrated with White House negotiations on the deal. Under Secretary of Defense Michele Flournoy led the administration's efforts in the heated debate.
"Those on our side viewed the White House as so eager to rid itself of Iraq that it was willing to withdraw rather than lock in arrangements that would preserve our influence and interests," he said in excerpts of the book released by Time Magazine.
He writes that his views were shared by other military commanders in the region and the Joint Chiefs of Staff but he believes that the Commander-in-Chief could have done more.
"Officials there seemed content to endorse an agreement if State and Defense could reach one, but without the President's active advocacy, al-Maliki was allowed to slip away. The deal never materialized," writes Panetta.