The action had been coordinated with the authorities in the West African country, the US military said.