“Iraq faces an existential threat, and Iraq’s leaders have to meet that threat with the incredible urgency that it demands,’’ Kerry said after meeting under heavy security with multiple officials in Baghdad. “The very future of Iraq depends on choices that will be made in the next days and weeks. . . . Not next week, not next month, but now.”

BAGHDAD — Secretary of State John F. Kerry, wielding the threat of US military action against Sunni militants sweeping across the north and west of Iraq, said Monday he was assured by the nation’s bickering political leaders that they would begin working to form a more inclusive government that could ease the sectarian violence.


Kerry said he had received repeated assurances from Iraqi leaders — including from embattled Prime Minister Nouri al-Maliki — that they plan to begin the difficult process of forming a new government by Tuesday.

But amid fresh signs of worry — and as Sunni militants capture more territory, controlling nearly the entire western frontier including a crossing on the Jordanian border — Kerry also stressed several times that the United States may take military action even before a new government is formed.

“Make no mistake: the president has moved the assets into place and has been gaining each day the assurances he needs with respect to potential targeting,” Kerry said during a press conference. “And he has reserved the right to himself, as he should, to make a decision at any point in time if he deems it necessary strategically.”

Kerry landed in Baghdad on an unannounced trip, arriving over a barren landscape aboard a hulking C-17 military airplane. During the daylong visit, he stressed to Iraqi leaders that they needed to do more — and quickly — to stem the tide of a terrorist network that is threatening not only the region but the world.


“None of us should have to be reminded that a threat left unattended, far beyond our shores, can have grave, tragic consequences,” he said.

Sunni militants — known as the Islamic State of Iraq and Syria, or ISIS — continued to seize towns and border crossings that put them closer to Jordan and Saudi Arabia. And a new poll showed the American public divided over whether the United States had a responsibility to act in Iraq at all, with 42 percent saying it did and 50 percent saying it did not.

Kerry began the day with Maliki in the prime minister’s office, a meeting held in the same compound where a shoe was thrown at President Bush in December 2008. After conferring for 99 minutes, Kerry was escorted out by officials and, just before getting in his car, said only, “That was good.”

Maliki has faced a chorus of demands, some even from Shi’ites in Iraq, to step down. US and Western officials have expressed concern that his aggressive crackdown on dissent and his preference for working mainly with Shi’ite officials have alienated Sunnis and Kurds, preventing the country from unifying against the threat from Sunni militants spilling over from Syria.

Kerry next met with Ammar al-Hakim, leader of the Shi’ite political party Islamic Supreme Council of Iraq; Hoshyar Zebari, a Kurdish leader who serves as foreign minister; and Osama al-Nujaifi, one of the highest-ranking Sunni officials in Iraq who will be key in forming the next government.


“It’s good to see you again,” Kerry told Nujaifi. “I know you’ve been more than busy. And these are difficult times.”

“These are difficult times for Iraq and the world if we don’t cooperate,” Nujaifi responded.

In a rare display of unity, the Sunni, Shi’ite, and Kurd officials agreed they would begin the process of forming a new government by July 1, as is required following parliamentary elections in April.

Following the recent certification of election results, the new Parliament will convene by that date to choose a new speaker. Over the following six weeks, they would choose a new president and prime minister, but the timelines can be accelerated. Kerry said no one — including Maliki — objected to the timeline.

Maliki’s bloc won 92 seats in Parliament, but to maintain his position as prime minister, he would need to have 165 seats.

Maliki was named prime minister in 2006. After initially saying he would not seek a third term, he vowed to fight to keep his position, which frustrated some Western officials. A senior State Department official hinted Monday that Maliki is not a lock for prime minister.

“The configurations for forming a government are almost endless,” said the official, briefing reporters before Kerry’s arrival.

“Our message is we can’t figure this out for you,” added the official, speaking on the condition of anonymity. “Because I guarantee you, if we said Mr. X should be speaker, there would then be Mr. Y and Mr. Z who would say, ‘Ah, The Americans are trying to interfere.’ And then — so our message is there’s urgency. There’s now a timeline. You guys really need to figure this out.”


US officials have suggested that calling for Maliki’s ouster would potentially have the opposite effect, emboldening him and his allies.

“The United States is not choosing any leader. We are not making any preconditions with respect to who can and can’t take part,” Kerry said Monday when asked whether he had faith in Maliki. “Neither the United States nor any other country has the right to pick who leads Iraq. That is up to the people of Iraq.”

Although Kerry has not called on Maliki to step aside, as he sketched out a future for the war-torn country where he has pointedly called for broader leadership beyond the much-criticized head of state.

“They must affect a unity that rises above the traditional divisions that have torn the government apart,” Kerry said.

Kerry’s trip comes days after President Obama announced that he was dispatching up to 300 military advisers to Iraq.

His stop in Iraq came after a visit to Cairo on Sunday and a trip to Brussels on Tuesday, where he is trying to coordinate a broader response to the crisis.

During his meetings in Baghdad, he spoke in more detail about the type of assistance the United States is preparing to provide.

There is a major increase in intelligence gathering, which could help Iraq respond to lost territory in the northern parts of the country. The United States is also planning to deliver additional supplies as early as Wednesday. The type of aid was not detailed.


“There’s no quick fix here. There’s no magic airstrike that’s going to change the entire situation,” the senior official said. “But they want to know that we see the threat, that’s a threat that we all share, and that we’re committed to helping them fight it.”

The Iraqi air force is extremely limited, the official said, with few helicopters and only two Cessna planes that can fire Hellfire missiles.

Matt Viser can be reached at matt.viser@globe.com.