By Olivier Knox

Secretary of State John Kerry cautiously signaled on Monday that the United States would be open to cooperating with Iran militarily in Iraq to beat back al Qaida-inspired fighters who pose an "existential" danger to that war-torn country and may look to target Europe and the United States.

“This is a challenge to the stability of the region. It is obviously an existential challenge to Iraq itself. This is a terrorist group,” Kerry told Yahoo Global News Anchor Katie Couric in an exclusive interview on the sidelines of a State Department conference on saving the world's oceans.

Prodded on whether the United States would consider cooperating militarily with Iran, Kerry replied: "Let’s see what Iran might or might not be willing to do before we start making any pronouncements."

But "I think we are open to any constructive process here that could minimize the violence, hold Iraq together the integrity of the country and eliminate the presence of outside terrorist forces that are ripping it apart," the top U.S. diplomat told Couric.

"I wouldn’t rule out anything that would be constructive to providing real stability, a respect for the (Iraqi) constitution, a respect for the election process, and a respect for the ability of the Iraqi people to form a government that represents all of the interests of Iraq not one sectarian group over another," he said.

"Kerry said Obama was giving "a very thorough vetting of every option that is available," including airstrikes, and underlined that "we are deeply committed to the integrity of Iraq as a country." Kerry’s comments came as President Obama looked at possible air strikes to stem the surge of extremists in Iraq known as the Islamic State of Iraq and Syria (ISIS). ISIS fighters have seized Mosul, which is the country’s second-largest city, and Tikrit, which is Saddam Hussein’s hometown. Overnight, they captured the city of Tal Afar, and American officials feared enough for Baghdad that they partially evacuated the U.S. embassy there while beefing up security.

Kerry also said that the United States and many of its key allies are "deeply concerned" about the possibility that some of their own citizens may number among the foreign fighters battling alongside jihadists in Syria's civil war and may return home bent on carrying out attacks there. He said citizens from Australia, Britain, Canada, France, Germany, the Netherlands, and the United States number among the foreign fighters in Syria.

Asked whether the next 9/11-style attacks could come from Iraq and Syria, Kerry replied that fighters like those in ISIS “clearly are focused not just there, but they’re focused on trying to do harm to Europe, to America and other people, and that’s why we believe it is so important for us to be engaged."

Asked whether ISIS could take the capital, Kerry replied, "I don't believe that they will in the near term," and he expressed skepticism that they could at all. He underlined that he was "absolutely convinced" that the United States had "the security it needs" for its embassy in Baghdad.

Kerry echoed sharp recent criticisms of Iraqi Prime Minister Nouri al-Maliki, whose iron-handed government is blamed for minority Sunni unrest fueling groups like ISIS, but he stopped well short of saying al-Maliki should resign.

“It’s up to the Iraqi people,” Kerry said. “I don’t think the United States should be issuing instructions or orders. I don’t think any country should.”

As the top U.S. diplomat, Kerry has played a central role in what may be the Obama administration’s biggest foreign policy gamble: negotiations with Iran over its suspect nuclear program. Those talks resume this week, with time running short to reach a deal that would lift crippling economic sanctions in return for steps designed to prevent Tehran from developing nuclear weapons.

The interview comes as Kerry launches a two-day “Our Ocean” conference at the State Department.

"It is a vital national security issue for the United States, what is happening to our oceans," Kerry said. "This is vital to food security, it's vital to stability, it's vital to security, it's vital to livelihoods for people. It's also the lifeline for life itself on Earth."

The conference rests on three pillars: sustainable fishing, battling marine pollution, and reducing ocean acidification.

"This is a very, very important conference," Kerry said.

And it ties in with Kerry’s frequent, outspoken warnings about the potentially catastrophic impact of climate change.

“You might not see climate change as an immediate threat to your job, your community or your families. But let me tell you, it is,” Kerry warned at Boston College’s commencement on May 19.

“If we do nothing, and it turns out that the critics and the naysayers and the members of the Flat Earth Society ... if it turns out that they’re wrong, then we are risking nothing less than the future of the entire planet,” Kerry said.

Kerry’s push on oceans, and climate change generally, will test the Obama administration’s ability to set the agenda at a time when headline-grabbing crises — Iraq, Ukraine, Nigeria — dominate the discussion of world affairs.

Watch the full interview here: