Defense Secretary James Mattis was the target of a failed rocket attack near a key Afghanistan airport Wednesday, the Taliban said, though the attack occurred after he had left the airport. Hours after Mattis landed, as many as 40 rockets were fired at Kabul's Hamid Karzai International Airport from an unknown location and landed in an open area, according to Najib Danish, spokesman for the Afghan Interior Ministry. US military officials added that a barrage of up to 40 rounds of munitions hit the airport, including 29 rocket-propelled grenades.

According to CNN, Mattis and NATO Secretary General Jens Stoltenberg had already left the airport at the time of the incident, Danish said. No one was injured.

NATO Secretary General @jensstoltenberg together with US Secretary of Defense James Mattis is at RSHQ today visiting AFG leadership & troops pic.twitter.com/Saf5r7dIa2 — Resolute Support (@ResoluteSupport) September 27, 2017

No U.S. personnel were injured, but a spokesperson for the Afghan Interior Ministry said five Afghan civilians were wounded in the attack. According to media reports, Kabul airport chief Yaqub Rassouli said airplane hangars and some helicopters were also damaged.

The Taliban, which claimed responsibility for the attack, said that Mattis was the target. ISIS has now also claimed the attack. A Taliban spokesman tweeted that the attack was aimed at the secretary's plane.

Afghan President Ashraf Ghani said at a press conference that his country's special forces are "dealing with" the incident. Mattis, standing with Ghani, called the attack a "criminal act by terrorists."

"It’s designed to go after generally innocent people to make some sort of statement," the U.S. defense chief said. "This is a classic definition of what the Taliban are up to right now. It defines their approach to how they see their role here and if in fact this is what they have done, they will find the Afghan security forces continuing on the offensive against them in every district of the country right now. So it is what it is, but it’s also the reason why we band together, and we don’t question what we’re doing here.”

This was Mattis's first trip to Afghanistan since President Donald Trump announced a new South Asia strategy that will send an additional 3,000 U.S. troops to the country. There are approximately 11,000 U.S. forces there now advising and assisting the Afghan military's fight against the Taliban, as well as adding additional firepower to the counterterrorism mission against ISIS and Al Qaeda.