Friendly fire

attack on friendly forces misidentified as hostile ones

Friendly fire is when a soldier accidentally injures or kills someone from their own military or a soldier who is on neither side. If civilians are killed and not soldiers, it is called collateral damage.