Kabul (AFP) - US Defense Secretary Jim Mattis warned of "another tough year" in Afghanistan as he arrived on an unannounced visit Monday, hours after his Afghan counterpart resigned over a deadly Taliban attack that triggered anger and left the embattled army in disarray.
Paying his first visit to Afghanistan as Pentagon chief, Mattis met with President Ashraf Ghani and other officials and US military commanders.
"We're under no illusions about the challenges associated with this mission," he said at a press conference in Kabul with General John Nicholson, US commander of NATO forces in Afghanistan.
"2017 is going to be another tough year for the valiant Afghan security forces and the international troops who have stood, and will continue to stand, shoulder-to-shoulder with Afghanistan against terrorism," he said.
His arrival came after a Taliban attack Friday on an Afghan military base which left more than 100 soldiers killed or wounded.
"It shows why we stand with the people of this country against such heinous acts perpetrated by ... this barbaric enemy," Mattis said.
Nicholson recently called for "a few thousand" more troops but Mattis would not be drawn on extra forces to help battle the resurgent militants, who are gearing up for the spring fighting season.
The Pentagon chief, who served in Afghanistan, is compiling an assessment for President Donald Trump on the brutal and seemingly intractable conflict.
"As you know, President Trump has directed a review of our policy in Afghanistan as the new administration takes hold in Washington. This dictates an ongoing dialogue with Afghanistan's leadership and that's why I came here," he said.
Mattis arrived as Afghan security forces, already paying a heavy price against the Taliban, faced chaos with the resignations of Defence Minister Abdullah Habibi and army chief Qadam Shah Shaheem.
The resignations, along with the announcement of a corps commanders reshuffle, followed fury over the Taliban assault on an army base outside the northern city of Mazar-i-Sharif.
Gunmen in soldiers' uniforms and armed with suicide vests entered the base in army trucks and opened fire at unarmed troops in one of the deadliest-ever Taliban attacks on an Afghan military target.
Afghan authorities have so far ignored calls to break down the official toll of more than 100 soldiers killed or wounded. Some local officials have put the number of dead alone as high as 130.
The raid, the latest in a series of brazen Taliban assaults, underscores the insurgents' growing strength more than 15 years since they were ousted from power by the US invasion of 2001.
Up to 10 army personnel are being questioned as suspects, a military spokesman attached to the base said, amid fears it could have been an insider attack.
At least four of them had valid passes to the base and had previously trained there, a security source told AFP.
Afghans have slammed the government over the attack, though Habibi told a press conference Monday his resignation was voluntary.
"Nobody in the world has been able to prevent such attacks," he said of the base assault. "It is an intelligence war and a war on terrorism. It is very difficult."
- Troops targeted -
Nicholson also spoke alongside Mattis at the press conference at NATO headquarters in Kabul, vowing there was "no space" for the Islamic State jihadist group in Afghanistan.
The US decision to drop its largest non-nuclear weapon on IS hideouts in eastern Afghanistan less than two weeks ago was a "very clear message" to the group, he said: "If they come to Afghanistan they will be destroyed".
The use of the GBU-43/B Massive Ordnance Air Blast, dubbed the "Mother of All Bombs", triggered global shockwaves, with some condemning the move against a militant group that is not considered as big a threat to Afghanistan as the Taliban.
Mattis is the second senior US security official to visit Afghanistan this month: National Security Advisor General H.R. McMaster arrived in Kabul days after the MOAB was dropped.
The Afghan war is the longest in US history but Trump has scarcely mentioned it -- other than to call the MOAB strike a success -- since entering office.
Mattis said in February his commander-in-chief was waiting for input from his generals.
The US has around 8,400 troops in the country with about another 5,000 from NATO allies assisting a much larger Afghan force in the war against the Taliban and other Islamist militants.
Afghan troops and police, beset by killings and desertions, have been struggling to beat back insurgents since US-led NATO troops ended their combat mission in December 2014.
According to US watchdog SIGAR, casualties among Afghan security forces soared by 35 percent in 2016, with 6,800 soldiers and police killed.
More than a third of Afghanistan is outside government control.