American-led airstrikes killed at least 180 Islamic State fighters as local Kurdish forces­ scrambled to repel a bold, multi-pronged assault by the militants, U.S. and Iraqi officials said Thursday.

At least four coordinated attacks by more than 300 heavily armed militants kicked off the most intense fighting that northern Iraq has seen this year, illustrating the extremist group’s continued potency despite a year-long air campaign by the United States and its allies. It is an indication of the challenges that Iraqi forces and their U.S. backers will face as they seek to reclaim Mosul and other areas under Islamic State control in Iraq and Syria.

Brig. Gen. Mark Odom, the top U.S. military official in northern Iraq, said that U.S. and allied aircraft launched a 17-hour aerial attack in response to the offensive against Iraqi Kurdish security ­forces, known as the peshmerga.

The Islamic State assault began about 4 p.m. Wednesday and targeted at least four positions along the front line north and east of Mosul that peshmerga fighters have held for months. One site, which was hit by a barrage of artillery fire, was a base used by Turkish troops training local ­forces.

In Iraq and other parts of the Arab world, there is a widely held belief that the United States is covertly aiding the Islamic State. Iraqis say they base their suspicions, in part, on videos that purport to show evidence of this alliance. U.S. military officials say the allegation is too far-fetched to merit a response. (Liz Sly and Jason Aldag/The Washington Post)

U.S. officials said the militants advanced with an array of weaponry, including car bombs, vehicles mounted with machine guns, armored bulldozers and mortars. While most of the fighters surged toward the peshmerga positions from Mosul, which has been under Islamic State control since June 2014, a smaller number had previously infiltrated the Kurdish fighters’ front line, the officials said.

U.S. Defense Secretary Ashton B. Carter, who met with Iraqi Kurdish leaders during a previously scheduled visit to Irbil on Thursday, said the outcome of the fighting reflected the effectiveness of Kurdish ­forces, especially when backed by U.S. and allied air power.

But the attack, just as much, demonstrates the resilience of the Islamic State, also known as ISIL or ISIS, which retains the ability to launch large-scale operations that threaten to overwhelm local forces­ on the ground.

The fighting in northern Iraq comes as President Obama struggles to defend his policy — called feeble by some critics in the wake of the terrorist attacks in Paris and San Bernardino, Calif. — and his handling of the war in Syria, where Russia’s new air campaign has added to the complexity of an already tangled conflict.

Hemin Hawrami, a Kurdish official, said at least seven Kurdish fighters were killed, including two senior commanders. A U.S. defense official, speaking on the condition of anonymity to discuss the military operations of a partner, said at least 18 peshmerga fighters were killed.

“This was the hardest punch ISIL had thrown since this summer, and the peshmerga defeated them,” said Col. Steve Warren, a U.S. military spokesman.

Map: What a year of Islamic State terror looks like

The Islamic State, strengthened by confiscated weapons and foreign fighters, remains dug in across much of Iraq and Syria, frustrating the United States and a raft of allies who seek to defeat it. In recent months, the Pentagon has rolled out new military measures that are aimed to bolster the U.S. strategy, which relies on local forces­ rather than American troops to do ground combat.

Odom described the assault as a “spoiling attack” by the Islamic State at a time when the group is under pressure from intensified airstrikes and partner ground operations.

He said the U.S.-led air attack, which lasted until 9 a.m. Thursday, also included French, British and Canadian aircraft. The U.S.-led coalition declined to say how many munitions were dropped.

U.S. officials said more militants, in addition to the 180 believed to have been killed by airstrikes, may have been slain by peshmerga counterattacks on the ground. Odom declined to disclose whether U.S. or allied personnel took part on the ground in the defense of the Kurdish ­forces.

Among the positions attacked by the Islamic State was a base where Turkish forces­ have been training a militia force overseen by Atheel al-Nujaifi, the former governor of Iraq’s Nineveh province. In a phone interview, Nujaifi said that he was at the camp at the time and that he came under a 2 1/2 -hour barrage of mortar fire. Two of his fighters were killed and six injured, while four Turkish trainers were also wounded, he said.

Nujaifi said a drone had been flying overhead in the lead-up to the attack, during which 130 mortar rounds were fired. “We thought that it belonged to the coalition, but we contacted them and it didn’t,” he said, concluding that it had been flown by Islamic State militants to spot their positions. “It continued to feed them targets.”

The Turkish military said it returned fire after the camp was hit by Katyusha rockets and confirmed that four of its soldiers were injured.

The Islamic State attack comes amid heightened tensions between Ankara and Baghdad over the presence of the Turkish troops that Iraqi officials say were deployed without their permission. Analysts have said Turkey’s move was an attempt to expand its influence to counter increased Iranian and Russian involvement in the region.

Nujaifi said the Turkish trainers have been there since March 2014 and numbered about 100. He declined to comment on the size of a recently deployed “protection force.”

The U.S. defense official said 100 to 200 Turkish trainers had been at the Zilikahn base since this summer. More recently, the official said, Turkey sent about 1,000 additional troops to the site in what was described as a “force protection” move.

Last week, Iraqi Prime Minister Haider al-Abadi called for the immediate withdrawal of the Turkish troops; he also lodged a complaint with the United Nations. This week, in a call with Turkish Prime Minister Ahmet Davutoglu, Vice President Biden urged that the troops be withdrawn.

Turkey, which said the reinforcements had been sent to address “intensifying security risks,” agreed to “rearrange” its forces­ this week.

U.S. Defense Secretary Ash Carter, who met with Iraqi Kurdish leaders during a visit to Irbil on Thursday, said the outcome of the fighting reflected the effectiveness of Kurdish forces, especially when backed by U.S. and allied air power. (Lolita C. Baldor/AP)

Carter said the Pentagon was preparing to arm two peshmerga brigades designated to take part in a future operation to encircle Mosul. The arms include M16 rifles, mortars and equipment to counter improvised bombs.

In his visit to Irbil, Carter also met with Special Operations troops who were recently inserted into Syria as part of a newly expanded U.S. effort to identify and support Syrian Arab ­forces. U.S. officials hope these opposition forces­ will ratchet up pressure on Raqqa, the Islamic State’s de facto capital there.

“This was a mission to explore that possibility and get to know these people,” Carter said. He said the outcome of the initial Special Operations mission was “very heartening.”

A senior defense official said the U.S. forces­ concluded that there were substantial numbers of Syrian fighters who would be willing to work with the United States to isolate Raqqa. This fall, the Pentagon backed away from an earlier plan to stand up a new force of Syrian fighters, in part because of the difficulty of recruiting fighters focused on battling the Islamic State rather than Syrian President Bashar al-Assad.

Morris reported from Baghdad.