(CNN) — 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, the 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. He did not reveal how many rockets were fired.

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

The Taliban has claimed responsibility and said Mattis’ plane was the target of the attack, the Taliban’s spokesman, Zabiullah Mujahid, tweeted.

Up to 40 rounds of munitions hit the airport, according to a US military official, 29 of which were rocket-propelled grenades. The nature of the other munitions was not immediately known.

The official said the munitions were fired toward a guard tower and hit the south side of the airport.

An Afghan special forces unit was searching houses close to the airport on the suspicion that the rockets were fired from them, Danish added.

Mattis’ unannounced visit Wednesday was his first trip to the country since US President Donald Trump announced a new Afghan strategy in late August.

At a press conference with Afghan President Ashraf Ghani and Stoltenberg, Mattis said he had only heard some press reports but said “an attack on an airport anywhere in the world is a criminal act by terrorist.”

“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,” Mattis added.

Presidential meeting

Mattis met with Afghan President Ghani at the Presidential Palace, alongside Stoltenberg and Gen. John Nicholson, commander of US forces in Afghanistan.

Saying it was “refreshing” to be in the country alongside NATO’s leader, he said a “lot was riding” on Trump’s new strategy.

“A lot is riding on this of course as we look toward how do we put an end to this fighting and the threat of terrorism to the Afghan people, to the international community and how do we put this into a path of political reconciliation,” he said.

At the time, Trump said he was shifting the policy to take the emphasis off troop numbers, and would rely on greater regional cooperation to stabilize the security situation in Afghanistan.

“We are here to set the military and security conditions for that but recognize ultimately the responsibility for the Afghan leadership under your direction,” Mattis added.

Earlier Mattis met with key Afghan government officials, including Defense Minister Tariq Shah Bahrami and Interior Minister Wais Barmak, as well as Stoltenberg and Nicholson, at Resolute Support Headquarters.

Nicholson gave an assessment of the fighting season so far, saying it had gone as well as can be expected.

Stoltenberg also spoke at the meeting, reiterating NATO support for Afghan forces.

“We are ready to train, assist and advise. We would like to help you break the stalemate that we have seen,” he said.

During his visit, Mattis is also expected to meet with the and spend time with US troops.

Later, he’ll hold a press conference with Ghani and the NATO chief.

Last week, Ghani used a substantial part of his speech at the United Nations General Assembly to praise Trump’s recently announced strategy for Afghanistan and South Asia.

“With President Trump’s recent announcement of his strategy to counter terror and stabilize South Asia, Afghanistan’s enduring partnership with the United States and the international community has been renewed and redirected,” Ghani told the audience at the UN headquarters in New York.

Afghan strategy

In his August prime-time address, Trump outlined his plan for the war in Afghanistan, vowing that the US would “fight to win” while no longer “nation-building.”

The President declared he would no longer announce troop levels but would focus on allowing US forces to target the Taliban and other terrorist groups wherever they were in Afghanistan.

“America’s enemies must never know our plans, or believe they can wait us out. I will not say when we are going to attack, but attack we will,” said Trump, before a crowd of US troops.

There are approximately 11,000 US troops in Afghanistan, according to revised figures given by the Pentagon in late August. The number given was around 2,600 more than had been officially disclosed due to a change in its accounting procedures.

Before entering office, Trump had campaigned for a complete withdrawal of US troops from the country. The 16-year war has claimed the lives of more than 2,200 US troops, as well as thousands of allied forces. Tens of thousands of Afghan civilians and military have also died in the conflict.

Trump indicated in August that he’d changed his mind and said withdrawing from Afghanistan would dishonor those killed.

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox