The U.S. military says American Marines accused of killing 19 Afghan civilians while responding to an ambush last year acted in accordance with military rules .