A complex and difficult medical procedure that ultimately failed might have contributed to the death of an American Special Forces soldier killed last year in a firefight in Somalia, according to an investigation into the episode obtained by The New York Times.

The redacted Army investigation illustrates the intense violence that can accompany the Pentagon’s quiet “train, advise and assist” missions in distant corners of the globe, and the limitations of the American military despite its ambitious reach, vast resources and extensive training.

Staff Sgt. Alex Conrad, 26, died from wounds he received during an attack on June 8, 2018, at a small outpost near the town of Jamaame, about 200 miles southwest of Mogadishu, the capital. He was hit with shrapnel from a mortar round, peppering his face, neck, stomach and legs, starting an hourlong effort to save his life. Three other Americans and a Somali soldier were wounded in the attack by militants from al Shabab.

The investigation’s documents also highlight the disparity in resources between different countries overseen by the American military command in Africa. Failures from the Oct. 4, 2017, ambush in Niger that left four American soldiers and five Nigeriens dead pointed to a lack of medical evacuation support, overhead surveillance and intelligence about their enemy.