Kerry’s visit came after Sunni militants took strongholds along Iraq’s western border at the weekend, strengthening supply routes from Syria where they have exploited a three-year-old rebellion to capture swathes of territory.

Iran’s Supreme Leader Ayatollah Ali Khamenei on Sunday accused Washington of trying to regain control of the country it once occupied – a charge Kerry denied, saying the United States was committed to helping Iraq but wanted a more inclusive government.

Kerry would “discuss U.S. actions underway to assist Iraq as it confronts this threat and urge Iraqi leaders to move forward as quickly as possible with its government formation process to forge a government that represents the interests of Iraqis,” State Department spokeswoman Jen Psaki said.