The Taliban and the Islamic State both claimed responsibility for a furious rocket attack on Kabul's airport Wednesday as Defense Secretary Jim Mattis and NATO Secretary-General Jens Stoltenberg visited the Afghan capital.

Taliban spokesman Zabihullah Mujahid said on Twitter that Mattis' plane was the target of the attack.

Missiles hit in and around the Hamid Karzai International Airport hours after Mattis arrived for talks with Stoltenberg and Afghan officials and to meet U.S. forces. Afghan Interior Ministry spokesman Najib Danish said at least one civilian was killed and several wounded, many when one of the rockets hit a nearby house.

Security forces killed two of the attackers and suicide vests felled two others, Danish told TOLOnews. Authorities seized a rocket-propelled grenade, bombs, suicide vests and other explosives from a building where the attackers holed up, he said.

The attack damaged dozens of homes in the area, local media reported.

"An attack on an international airport anywhere in the world is a criminal act by terrorists," Mattis said later at a joint press conference with Stoltenberg and Afghan President Ashraf Ghani. "Its designed to go after generally innocent people to make some sort of statement. And it's a classic example of what the Taliban is up to right now."

More:Afghanistan endorses Trump's revised strategy; Taliban warns of 'graveyard'

More:Cautioning against 'hasty' pullout, Trump clears path for more U.S. troops

The Islamic State's Amaq News Agency released a brief video clip of a fighter "using an SPG9 rocket to target the location," said SITE Intelligence Group, a U.S.-based organization that monitors extremist activity online.

Kabul airport chief Yaqub Rassouli said the attack began when two missiles were fired on the airport shortly before noon local time. The incident destroyed a helicopter and damaged three others plus some air force hangers.

The U.S. Embassy in Kabul said the airport was closed and urged U.S. citizens to avoid the area. Mattis said such attacks only strengthen U.S. and global resolve.

"We will not abandon Afghanistan to a ruthless enemy trying to kill its way to power," Mattis said.

Stoltenberg pledged NATO support in the fight against the Taliban and other terror groups.

“If NATO leaves, we risk Afghanistan returning to a state of chaos, a safe haven for international terrorism,” Stoltenberg said. “The last time that happened, it led to the 9/11 terrorist attacks in which almost 3,000 people were murdered — we cannot allow that to happen again."

Last month, President Trump announced a new strategy for Afghanistan, committing to "fight to win" in the nearly 16-year-long conflict and clearing the path for thousands more U.S. troops.

Trump said he would lift restrictions on commanders in the field imposed by the Obama administration and increase pressure on Pakistan to stop providing a safe haven to militant groups along its border.

Mattis said Tuesday the 300,000-strong Afghanistan forces would continue to lead the fight.

"The sooner the Taliban learn they cannot win with bombs, the sooner the killing will end," Mattis said.