Vice President Mike Pence

Vice President Mike Pence told US troops in Afghanistan Thursday that they have put the Taliban on the run, as he became the most senior Trump administration official to visit the men and women fighting America's longest-ever war.

Flying secretly through the day and night on a standard unmarked US Air Force C-17, Pence corkscrewed into Bagram Airfield on the unannounced visit, to thank some of the roughly 15,000 US personnel still hoping to turn the tide in the conflict, now in its 17th year.

The superpower's vexed campaign against Al-Qaeda and the Taliban -- born from the rubble of the 9/11 attacks on New York and Washington, receives ever-less public attention in the United States these days.

"The American people deserve to know that with the courage of everyone gathered here, we're making real progress in this fight for freedom in Afghanistan," Pence told the troops.

"We've dramatically increased American air strikes. And together with our Afghan partners, we've put the Taliban on the defensive," he said, also pointing at efforts to target the drug trafficking networks that help fund the Taliban.

"All across this country we've won new victories against the terrorists, no matter what they call themselves or where they try to hide."

"And never doubt that your mission -- your mission here in Afghanistan -- is vital to the safety and security of the American people," Pence said.

Pence's visit was designed to shift the spotlight back on personnel and their mission, however briefly, before Americans turn their focus to turkey lunches, festive cheer and contentious domestic politics.

His visit also included a helicopter dash from Bagram into the heart of the capital Kabul to meet President Ashraf Ghani and Chief Executive Abdullah Abdullah, both of whom the United States is counting on to help rebuild this war-shattered country.

"We've been on a long road together" he said. "We've both sacrificed much."

But, he added: "We are here to see this through."

The vice president also aimed a jab at neighboring Pakistan -- reiterating word for word Trump's warning that it must stop offering cross-border safe havens to Taliban factions and armed jihadist groups fighting US troops and their Afghan allies.

"President Trump has put Pakistan on notice," Pence said.

- In doubt until last moment -

"Pakistan has much to gain from partnering with the United States, and Pakistan has much to lose by continuing to harbor criminals and terrorists."

His visit comes four months after Trump unveiled a new strategy for Afghanistan, which he told the troops was "already bearing fruit."

With typical certitude, the 45th commander-in-chief promised a nation "weary of war without victory" a more ruthless campaign, and one without Obama-era exit deadlines or niceties.

"We are not nation-building again. We are killing terrorists," Trump said in unveiling the strategy at Fort Myer, Virginia in August. "In the end, we will win."

But the trip comes as Afghan security forces struggle to beat back the Taliban, which has been on the offensive since the withdrawal of US-led NATO combat troops at the end of 2014 and maintains control over swathes of the country.

And the fact that Pence's visit took place in secrecy and under cover of winter darkness is a stark reminder of the difficult security situation even around Kabul and even after a war effort worth more than half a trillion dollars.

Later asked by reporters whether the US would consider raising its military presence in the country, Pence demurred.

"That will be a decision for the commander in chief in the days ahead, but again this is... not just personnel," he said.

"You know, I said today that bureaucrats don't win wars, soldiers do. And one of the things that you have seen in President Trump, as commander in chief, is he has empowered our battlefield commanders to make real-time decisions," he continued, citing successes against the Islamic State group in Iraq and Syria.

His visit from Bagram to central Kabul was in doubt until the last moment, when a White House official said he countermanded a decision that the weather was not clear enough to travel.

Even then, Pence's helicopter flight took place in near total darkness, moving low and fast and with a heavy phalanx of secret service and special forces.

The White House official said the decision was made "out of respect. To meet with Ghani and Abdullah."

The Trump administration, like Barack Obama's before, has put enormous hope in Ghani, who is seen by the White House as more competent and less corrupt than his predecessor Hamid Karzai.

But his three-year-old "national unity" government appears to be faltering and parliamentary elections have been repeatedly postponed.

Pence had been expected to visit Egypt and Israel this week, a trip that was delayed amid a crunch vote on tax cuts and deadly protests at Trump's decision to recognize Jerusalem as Israel's capital.