Gandhi justified his view, "Any injustice on our land, any encroachment on our land should be defended by violence, if not by non-violence... If you can defend by non-violence, by all means do it; that is the first thing I should like. If it is for me to do, I would not touch anything, either a pistol or revolver or anything. But I would not see India degrading itself to be feeling helpless." ('Sardar Vallabhbhai Patel: India's Iron Man', B Krishna, Harper Collins India, 1996.)
But whatever exception Gandhi may have considered allowable to nations and individuals in the matter of self defence, he was himself, of course, a committed and unwavering adherent of ahimsa. He died by an assassin's bullet because he considered having a bodyguard as condoning violence for one's personal safety. The point I am trying to make here is that though Gandhi was himself unwaveringly committed to his non-violent ideology he did not allow it to blind him to reality, nor lead him into dishonesty in its propagation. He did not hesitate to state that recourse to violence was not something that could be entirely avoided in the course of human affairs
http://www.timesoftibet.com/articles/151/1/Non-Violence-and-Non-Actionhttp://members.aol.com/ScottH9999/essays/Gandhi.htm