The American soldiers were part of a Green Beret team assigned to train and assist the Nigerien army in fighting terrorists.