The Islamic State militants killed an American soldier from the Navy SEAL team in northern Iraq on Tuesday after breaching the Kurdish defences.

The soldier from the highly specialised US special operations forces was killed close to the town of Tel Asqof near the militant stronghold of Mosul, the Kurdish peshmerga leaders fighting the Islamic State told Reuters.

Senior US defense official confirmed the dead serviceman was a Navy SEAL. "It is a combat death, of course, and a very sad loss," Defense Secretary Ash Carter told reporters in Germany.

This is the third incident of an American serviceman getting killed in direct combat since a US-led coalition launched a campaign in 2014 to "degrade and destroy" Islamic State. The campaign was said to be a measure of its deepening involvement in the conflict.

The SEALs are considered to be among the most able US special operations forces and are capable of taking on dangerous missions. The man's identity and rank were not disclosed by the Pentagon.

The dead serviceman was identified as Charlie Keating IV by the governor of the US state of Arizona, Doug Ducey. He said that Keating had attended high school in Phoenix.

The San Diego Union-Tribune newspaper in southern California reported that Keating was the grandson of Charles Keating Jr., a banker who played a leading role in the US savings and loan scandal of the 1980s that embroiled five US senators.

The Islamic State militants occupied the Tel Asqof town on Tuesday. but were later driven out by the Peshmerga forces.

A US military official told Reuters: "The coalition had helped the peshmerga by conducting more than 20 air strikes with F-15 jets and drones." The official also informed that Keating was killed "by direct fire" while he was on a mission to advise and assist local forces in Iraq.

However, this has been contradicted by the White House. Reuters reports that the White House told reporters that though the serviceman died in a combat situation, he was not on a combat mission.

White House spokesman Josh Earnest told Reuters: "He was not on the front lines. But he was two miles away, and it turns out that being two miles away from the front lines between Iraqi forces and ISIL is a very dangerous place to be."

Carter's spokesman Peter Cook said: "The incident took place during an Islamic State attack on a peshmerga position some 3 to 5 km behind the forward line."

According to the Kurdistan Region Security Council, at least 25 Islamic State vehicles were destroyed on Tuesday and more than 80 militants were killed. At least 10 peshmerga fighters also died in the fighting, according to a Kurdish official who posted pictures of the victims on Twitter.

The Kurdish military sources also revealed that the Peshmerga forces also covered up several Islamic State attacks on the Bashiqa front and in the Khazer area, about 40 km west of the Kurdish regional capital Erbil.

Since December the Islamist militants have been broadly evacuating after Ramadi was recaptured by the Iraqi army even as the US officials say that military gains against Islamic State are not enough.