Mohandas K. Gandhi considered himself a Hindu. But as a Hindu, he saw all religions as equal, as trying to seek and express the same eternal truths and wisdom. At the core he believed in the power of truth, compassion for others, and nonviolence. The nonviolent aspect of his belief marked his nonviolent resistance to the British. It meant he had to be more clever in finding ways to confront British colonial rule in India without matching oppression with violence. The belief in the equality of religions also meant that he believed India and Pakistan had a moral responsibility to each other, especially since they were partners in the struggle against the British. It was for his insistance that India pay its debts to Pakistan that a zealous Hindu nationalist assassinated him.
Some particular elements in his beliefs include the importance of celibacy for achieiving spiritual purity and the importance of vegetarianism as an expression of nonviolence toward animals. There was also an aspect of renunciation in Gandhi's life: he gave up most possessions to live simply and make do with less. This also had an effect on British rule: if more people lived simply and were more self-reliant, they would undercut the economic value of India in the British Empire.