KABUL, Afghanistan — Defense Secretary Jim Mattis arrived in Kabul for an unannounced visit Friday.

Mattis and Marine Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, were meeting with Army Gen. Scott Miller, the new commander of NATO troops in Afghanistan.

They were to discuss progress on peace talks with the Taliban, despite a deteriorating security situation and turmoil in the Afghan government.

Mattis is scheduled to conduct a town hall meeting with troops, attend a weekly memorial service and meet with senior Afghan leaders, officials said.

Miller assumed command of NATO forces in Afghanistan on Sunday, arriving as Washington faces growing questions over its strategy to force the Taliban into talks to end the grinding conflict.

Speaking with reporters this week, Mattis said he was hopeful about peace talks with the Taliban.

"Right now, we have more indications that reconciliation is no longer just a shimmer out there, no longer just a mirage," Mattis said.

"It now has some framework. There's some open lines of communication," he added.

Over the summer, a top U.S. State Department official met with Taliban officials in Qatar to lay the groundwork for broader peace talks.

The U.S. government has pointed toward the Taliban's accepting a temporary truce in June as a sign of why the talks should be viewed with hope.

"The most important work that has to be done is beginning the political process and reconciliation," Dunford told reporters traveling with him.

"What we are trying to do in the military dimension is convince the Taliban that they cannot win on the battlefield and that they must engage in a peace process."