Yeclo has this useful explainer by the Abidjan Military Court about the functions of the military prosecutor in Ivory Coast. (Google Translate will do a good job with the French original.) Excerpt:
The Government Commissioner is only competent to prosecute gendarmes, the military and the police, that is to say to find that they have committed faults against the criminal law, to investigate, arrest and take to prison if the facts are proven and then judge them. . . .
It follows from there that when a soldier, gendarme or police officer is the victim of acts committed by civilians, it is not the Government Commissioner who is in charge of the case but the Civil Prosecutor.
So when a soldier is attacked or injured or killed on a mission by strangers or civilians, it is the Civil Prosecutor who is competent.