U.S. Defense Secretary Ash Carter said on Wednesday that Washington and its allies have agreed to do more in their campaign to defeat the Islamic State group, but that more risks lie ahead.

Carter made the comment following talks in Germany with defense ministers and representatives from 11 other countries participating in the alliance.

He said the United States greatly regretted the death of a Navy SEAL in an attack by the jihadist group in northern Iraq Tuesday, naming the man as Petty Officer First Class Charles Keating.

"These risks will continue ... but allowing ISIL safe haven would carry greater risk for us all," Carter added, using an acronym for the Islamic State extremist group.

"We also agreed that all of our friends and allies across the counter-ISIL coalition can and must do more as well, both to confront ISIL in Iraq and Syria and its metastases elsewhere."

The talks included ministers from France, Britain and Germany and were planned well in advance of Tuesday's attack, in which ISIS fighters blasted through Kurdish defenses and overran a town.

The elite serviceman was the third American to be killed in direct combat since the U.S.-led coalition launched a campaign in 2014 to "degrade and destroy" Islamic State, and is a measure of its deepening involvement in the conflict.

Offering new details about Keating's mission, Carter said the SEAL's job was to operate with Iraqi Kurdish peshmerga forces to train and assist them north of the city of Mosul.

"That part of the peshmerga front came under attack ... and they found themselves in a firefight," Carter said.

A U.S. military spokesman told reporters in a Pentagon briefing on Wednesday that the Navy SEAL was part of a "quick reaction force" that had been called in by American advisers.

In mid-April, the United States announced plans to send an additional 200 troops to Iraq and put them closer to the front lines of battle to advise Iraqi forces.

In late April, President Barack Obama announced he would send an additional 250 special operations forces to Syria, greatly expanding the U.S. presence on the ground there to help draw in more Syrian fighters to combat the Islamic State group.

Carter said the risks extended to pilots flying a U.S.-led campaign of daily airstrikes. "Every time a pilot goes up in an airplane above Syria or Iraq they're at risk," he said.

The Islamist militants have been broadly retreating since December, when the Iraqi army recaptured Ramadi, the largest city in the western region. Last month, the Iraqi army retook the nearby region of Hit, pushing the militants further north along the Euphrates River valley.

But U.S. officials acknowledge that the military gains are not enough.

Iraq is beset by political infighting, corruption, a growing fiscal crisis and the Shi'ite Muslim-led government's fitful efforts to seek reconciliation with aggrieved minority Sunnis, the bedrock of Islamic State support.