KABUL, Afghanistan — Vice President Mike Pence told Afghan President Ashraf Ghani on a secret visit Thursday to Afghanistan that the U.S. is “here to see this through” as they discussed a newly announced U.S. strategy to break the stalemate in America’s longest war and consulted on upcoming parliamentary elections.

Pence’s surprise pre-Christmas visit was the first to the war-torn country by either Trump or the vice president, and it came as the Trump administration charts a pathway to ending the 16-year war in Afghanistan.

“We’re here to see this through,” Pence told Ghani and Afghan Chief Executive Abdullah Abdullah at the presidential palace in Kabul.

Later, at a rally-style event at Bagram Air Base, Pence told hundreds of U.S. troops: “I believe victory is closer than ever before.”

“It’s because of all of you that we’re safe. It’s because of you that we’re free. It’s because of you that freedom has a future in Afghanistan and America and all across the wider world,” Pence said.

Pence also was briefed by military leaders, including Gen. John Nicholson, the top U.S. commander in Afghanistan.

The White House restricted use of cellphones and internet communications for journalists traveling with the vice president, citing security concerns in Afghanistan.

Pence’s trip was focused on Trump’s strategy, released in August, to “fight to win” in Afghanistan by attacking enemies, routing al-Qaida and preventing terrorist attacks against Americans. He has urged the U.S. to shift away from a “time-based” approach to the conflict by linking U.S. assistance to results and cooperation from the Afghan government, Pakistan and other partners.

The White House has described the new Afghanistan plan as a “regional” strategy that aims to cultivate cooperation among other South Asian nations, including the overturning of Pakistan’s harboring of elements of the Taliban.

At least 15,000 U.S. forces are in Afghanistan after Trump sent about 3,800 troops this fall to enhance U.S. efforts to advise Afghan forces and conduct counterterrorism missions.

The expected deployment of hundreds more U.S. Army trainers to Afghanistan early next year could increase the total number of American forces there to nearly 16,000, U.S. officials have said.