MOHMAND VALLEY, Afghanistan — When I spent time with the 12 men of the Operational Detachment Alpha team in July, they had been fighting an Islamic State affiliate, the Islamic State in Khorasan, for four months. The team was based at Combat Outpost Blackfish, a farm compound at the mouth of the bucolic Mohmand Valley that they had named after the killer whale.

Their mission was to work with their Afghan Special Forces counterparts to defeat the Islamic State there and extend the Afghan government’s reach into the remote valleys that run down from the snow-capped mountains bordering Pakistan in Nangarhar Province. After months together isolated in rural Afghanistan, the team members, most of them much older than the typical military unit, had shunned many of the military’s rigid formalities.