Slain Navy SEAL Charles Keating was part of US rescue squad
Special Warfare Operator 1st Class Charles Keating IV, 31, of San Diego (AFP Photo/)

A Navy SEAL who was killed by Islamic State fighters died while helping rescue a team of American troops from an unexpected firefight with the jihadists, an official said Wednesday.

Charles Keating IV became the third US troop to be killed in the US-led coalition campaign against the IS group when he was struck by a bullet during a pitched battle on Tuesday.

His death illustrates the growing dangers US troops face in Iraq and Syria as they move ever closer toward the jihadists' frontlines.

Keating, 31, from Arizona, was part of a "quick reaction force" comprised of special operations troops on a mission to support US military advisers working with local peshmerga forces, Baghdad-based US military spokesman Colonel Steve Warren said.

Keating was the grandson of Charles Keating Jr., who was involved in a massive savings-and-loan scandal of the 1980s and 1990s, in which thousands of small financial institutions failed.

Tuesday's events started early in the morning as the US advisers were meeting with peshmerga fighters near the village of Tal Asquf, north of IS-stronghold Mosul.

According to Warren, the jihadists were unaware US troops were in vicinity but coincidentally launched an assault on the village.

Using suicide bombers, bulldozers and armored trucks, a group of about 125 IS fighters broke through peshmerga defenses and rushed toward Tal Asquf, getting about two miles (3.5 kilometers) beyond the line.

When the attack began, the US military advisers called Keating's quick reaction force to help get them away from the chaos.

"When the fire erupted, the quick reaction force... came to the battle and provided the additional firepower" needed to "extract the remainder of our personnel," Warren said in a video call to Pentagon reporters.

- 'Bullets everywhere' -

Keating was struck during the ensuing battle. Although a Black Hawk helicopter evacuated him to a hospital within an hour, he did not survive.

"This was a gun fight, you know, a dynamic gun fight, so he got hit just in the course of this gun battle. Whether it was a sniper or some fighter with his (AK-47) is unclear," Warren said. "There were bullets everywhere."

The fighting lasted all day, with US forces involved on the ground for at least a couple of hours.

The US-coalition carried out 31 plane and drone strikes, destroying 20 IS vehicles and other gear, Warren said.

About 60 IS fighters died, and the peshmerga forces went on a counterattack and recaptured Tal Asquf by the end of the day.

US advisers have been working with the peshmerga in northern Iraq for about a year, but recent decisions mean increasing numbers of US troops will be closer to the front lines.

Last month, the Pentagon said US military advisors will start working with Iraqi forces at the battalion level, meaning greater numbers will be physically closer to the fight in Iraq than before.

And the United States has increased sixfold -- from 50 to 300 -- the number of special operations forces and support personnel working in northern Syria, where they are training Kurdish and Syrian Arab fighters to tackle the IS group and call in air strikes.

The United States launched an anti-IS coalition, now supposedly comprising 65 countries, in August 2014.

Since then, the coalition has launched more than 12,000 air strikes against the self-proclaimed Islamic State group, and the Pentagon has deployed around 5,000 troops to Iraq.

Keating is the third US troop to be killed in action since the campaign began.

Rocket fire killed a US Marine in northern Iraq in March, while a special forces soldier died of wounds received during a raid in October.