For over a year now Iraq has been negotiating with the United States for the return of some American intelligence units. This is something Iraqi leaders don’t like to discuss in detail, because to do so means admitting that the Americans were so successful at crushing the Islamic terrorists because the U.S. had technology (hardware and software) and skilled intelligence personnel capable of monitoring just about all wireless communications in Iraq, in addition to most of what happened on the Internet. Wikileaks and the later NSA leaks make it pretty clear how this all worked. The difference between how effective counter-terrorism operations were in Iraq (not so good) and Afghanistan (still very good) after 2011 is, to the Iraqi leaders, traceable to a major Iraqi political failure in Iraq during 2011.
Back in 2010-11 many senior Iraqi leaders, especially those in the military and intelligence, wanted the American military intelligence forces to remain in Iraq after 2011. But the issue of immunity from local prosecution became a hot item in Iraqi politics and the “status of forces” agreement was impossible to get through parliament. Such immunity was essential because the Iraqi justice system is corrupt, and foreign troops could be falsely prosecuted. That risk was unacceptable in the West. Over 700 American civilian (former military personnel) trainers remained, using a special diplomatic agreement to obtain immunity.
Many Iraqi politicians knew exactly what was at stake when they blocked the status of forces agreement and knew that these American intelligence capabilities could be, and sometimes were, used to detect corrupt activities by senior Iraqi officials. Many Iraqi politicians are more concerned about not interrupting their illegal cash flow than they were with the number of Iraqis suffering from terrorist violence. Despite the recent advances by ISIL (the bad al Qaeda) many Iraqi politicians are still not willing to sign off on a status of forces agreement and let the American intel forces back in.