The Israeli military says it only targets militants and blames Hamas for civilian deaths because its fighters operate in dense residential areas.