An American service member was shot and killed Tuesday by "direct fire" from ISIS militants who stormed through defenses set up by Kurdish Peshmerga troops in northe Iraq, the U.S.-led coalition and Defense Secretary Ash Carter said.

The service member who was killed was serving as an adviser to the Peshmerga forces in the region, Pentagon Press Secretary Peter Cook said in a statement.

"It is a combat death, of course. And a very sad loss," Carter told reporters in Stuttgart, Germany, where he was attending a ceremony installing a new commander of U.S. European Command.

U.S. officials said the death occurred about 20 miles north of Mosul "in the neighborhood" of the city of Irbil, in Iraqi Kurdistan.

"The casualty occurred during an ISIL attack on a Peshmerga position approximately [two to three miles] behind the forward line of troops," Cook said.

A defense official told Fox News the American was killed by "direct fire" after Islamic State forces penetrated the Peshmerga's forward line.

Three U.S. military persoel have been killed in Iraq as part of the ground fight against the ISIS terror group. The last American death happened in March, when U.S. Marine Staff Sgt. Louis Cardin was killed in a rocket attack on a firebase in northe Iraq.

This past October, Delta Force Master Sgt. Josh Wheeler was killed during a rescue mission that freed as many as 70 ISIS hostages.

The latest death came following the deployment of a 200-person special operations task force to Irbil, which Carter first aounced in December. Last week, President Obama approved the deployment of 450 additional U.S. troops to Iraq and Syria.

Vice President Joe Biden visited Baghdad last week to exhort leaders of the govement in Iraq to resolve inteal political strife and concentrate on the effort to defeat ISIS.

Carter, likewise, visited Baghdad recently. The Obama administration has been pressing the effort against ISIS, which has been slowed down in its quest to overrun Iraq.

There are now roughly 5,000 U.S. troops on the ground in Iraq.

Fox News' Lucas Tomlinson and the Associated Press contributed to this report.