As Gandhi said, “Real noncooperation is noncooperation with evil, and not with the evildoer,” … In 1942, when India, her hands tied by the British, feared invasion by Japanese armies, Gandhi indicated how this could be done:
“If we were a free country, things could be done nonviolently to prevent the Japanese from entering the country. As it is, nonviolent resistance could commence the moment the Japanese effect a landing. Thus, nonviolent resisters would refuse them any help, even water. For it is no part of their duty to help anyone to steal their country. But if a Japanese had missed his way and was dying of thirst and sought help as a human being, a nonviolent resister, who may not regard anyone as his enemy, would give water to the thirsty one. Suppose the Japanese compel resisters to give them water, the resisters must die in the act of resistance.”
Nagler, N. Michael (2014) The nonviolence handbook: a guide for practical action. San Francisco: Berrett-Koehler, p.16.