In the early spring of 1845, Henry David Thoreau built and lived in a cabin near the shore of Walden Pond in rural Massachusetts. For the next two years, he enacted his own Transcendentalist experiment, living a simple life based on self-reliance, individualism, and harmony with nature. The journal he kept at that time evolved into his masterwork, Walden, an eloquent expression of a uniquely American philosophy. During the same period, Thoreau endured a one-day imprisonment for his refusal to pay a poll tax, an act of protest against the government for supporting the Mexican War, to which he was morally opposed. In his essay 'On the Duty of Civil Disobedience' he defends the principles of such nonviolent protest, setting an example that has influenced such figures as Gandhi and Martin Luther King, Jr., and that endures to this day.