Defense Secretary Jim Mattis visited Afghanistan on Tuesday to meet senior U.S. and Afghan officials and discuss both the military campaign and “peeling off” some members of the Taliban to pursue a peace deal with the Afghan government.

The unannounced visit comes two weeks after Afghan President Ashraf Ghani made what many observers consider an unprecedented offer, inviting the Taliban to begin peace talks without preconditions to end the 16-year war. The Taliban said last month that it is open to reaching a political settlement and negotiating, but it has not responded to Ghani’s offer.

Mattis, speaking on a flight to Afghanistan from Oman, said Tuesday that talking about a peace settlement is “not cart before the horse,” and that it is backed by the ongoing efforts of the U.S. and Afghan militaries. Some members of the Taliban may be willing to pursue peace, especially considering a fracturing in the group that has occurred over the last few years, he said.

“All wars come to an end,” Mattis said. “You don’t want to miss an opportunity because you weren’t alert to the opportunity. So, you need to have that door open, even if you embrace the military pressure.”

Mattis acknowledged that efforts to reconcile with the entire Taliban have been difficult. The effort right now, he said, is to reach “those who are tired of fighting” and build it out from there.

(c) 2018, The Washington Post · Dan Lamothe