A US Navy Seal has been killed in battle with the Islamic State of Iraq and the Levant (ISIL) - the third American death in Iraq since Washington launched a campaign against the group.

A US defense official told the AFP news agency on Tuesday that the soldier, Charlie Keating IV, was killed by "direct fire" and in "an orchestrated attack" after ISIL fighters used suicide bombers and heavy weaponry to break through Kurdish peshmerga defences north of its Mosul stronghold.

UpFront - How can ISIL be defeated?

He was said to be part of a small team advising the peshmerga at a camp near Tal Asquf, about 5km from the frontline.

The official said: "They [Navy Seals] fought, but they're a small number and they're not supposed to be in direct contact."

He said other soldiers left by helicopter after the Seal was shot.

Last month, the United States announced it was deploying additional forces to Iraq, bringing the official total to more than 4,000.

President Barack Obama had hailed the 2011 withdrawal of American troops from Iraq as a major accomplishment of his presidency, but US forces have been drawn back into the country by the campaign against ISIL.

Two US military personnel have already been killed by ISIL in Iraq: an American Marine by rocket fire in March and a special forces soldier who died of wounds received during a raid on a prison last October.

Obama has repeatedly pledged that there would be no "boots on the ground" to combat ISIL, but the administration has since sought to define the term as meaning something other than American forces being on the ground and in combat.

The attack came as the United Nations said that fighting with ISIL in northern Iraq could displace another 30,000 people, adding to millions who have already fled their homes.

Under a stepped-up campaign of US-led and Russian air strikes, as well as ground assaults by multiple forces in each country, ISIL is estimated to have lost about 40 percent of its territory in Iraq and more than 20 percent in Syria.

At its highest point in the summer of 2014, the group had overrun nearly a third of each country, declaring a "caliphate" spanning from northwestern Syria to the outskirts of Baghdad.

Source: Agencies