BAGHDAD (AFP) — US Secretary of State John Kerry landed in Baghdad Monday on a surprise trip to push for Iraqi unity and stability, as Sunni militants advanced in west Iraq after security forces retreated.

Flying in from Jordan on a visit which the State Department had sought to keep secret amid security concerns, Kerry was to meet with beleaguered Prime Minister Nuri al-Maliki and Iraqi leaders across the political and communal spectrum.

Kerry “will discuss US actions underway to assist Iraq as it confronts this threat from ISIL and urge Iraqi leaders to move forward as quickly as possible with its government formation process to forge a government,” State Department spokeswoman Jen Psaki said.

Iraqi security forces are struggling to hold their ground in the face of an insurgent onslaught that has seized major areas of five provinces, displaced hundreds of thousands of people and sparked fears that the country could be torn apart.

The militants, led by the jihadist Islamic State of Iraq and the Levant (ISIL), swept into the towns of Rawa and Ana in Anbar province, west of Baghdad, after taking the Al-Qaim border crossing with Syria.

They then gunned down 21 local leaders in Rawa and Ana in two days of violence, according to officers and doctors.

The government said its forces made a “tactical” withdrawal from the towns, control of which allows the militants to widen a strategic route to neighboring Syria where they also hold swathes of countryside along the Euphrates river valley.

Cut ISIL funding

ISIL aims to create an Islamic state incorporating both Iraq and Syria, where the group has become a major force in the rebellion against President Bashar al-Assad.

Washington wants Arab states to bring pressure on Iraq’s leaders to speed up government formation, which has made little headway since April elections, and has tried to convince them ISIL poses as much of a threat to them as to Iraq.

Washington’s top diplomat warned all countries, particularly in the Gulf, that “there is no safety margin whatsoever in funding a group like ISIL.”

The group, which has been at the forefront of the insurgent offensive, has commandeered an enormous quantity of cash and resources as a result of the advance, bolstering coffers that were already the envy of militant groups around the world.

US leaders have stopped short of calling for Maliki to step down, but there is little doubt that they feel he has squandered the opportunity to rebuild Iraq since US troops withdrew in 2011.

“The United States would like to see the Iraqi people find leadership that is prepared to represent all of the people of Iraq,” Kerry told reporters in Cairo on Sunday at the end of a visit to Egypt.

He noted that minority Kurds and Sunni Arabs, and even some within Maliki’s own Shiite community, had voiced dissatisfaction with the premier’s leadership, and said the government had to “rise above sectarian motivations.”

The Iraqi government has “to be inclusive and share power in a way that will maximize the ability of Iraq to focus on the real danger at this moment from an external source, which is ISIL,” Kerry insisted.

‘Lot of anxiety’

A top US official who has been on the ground in Iraq told reporters that there was “a lot of anxiety and a lot of looking to the US for help.”

Kerry’s message to Iraqi leaders would be that even though US troops withdrew in 2011, Washington had the “highest level of commitment to Iraq,” he said.

He would also do “person-to-person diplomacy with the key leaders and the key blocs as they work toward forming a new government along the constitutional timeline,” the official added.

Kerry also has meetings in Brussels and Paris with NATO and Gulf allies later in the week.

His task has been complicated as Iraq is in a political limbo after April elections in which Maliki won the largest number of seats, but not a majority, meaning some bitter bargaining to form a coalition.

Under a de facto system in place in Iraq following recent elections, the presidency has typically been retained by a Kurd, with a Shiite Arab as prime minister and a Sunni Arab as speaker of parliament.

Washington backed Maliki when he first became premier in 2006, as he was seen to be cracking down on Shiite militias while reaching out to Sunni leaders.

But he has since made what critics say are increasingly sectarian moves, triggering US calls for him to represent all Iraqis, particularly minority Sunni Arabs and Kurds.

Obama has offered to send up to 300 military advisers to Iraq, but has so far not backed air strikes as requested by Baghdad.

UN aid agencies are rushing supplies to help more than one million people displaced by unrest in Iraq.