However, Huckleberry is torn. He knows that Jim is a runaway slave, and in helping him, he is doing something illegal. Coming from a slave state, Huckleberry was taught through churches and schools that slavery was both right and legal. People who helped slaves escape were viewed as criminals themselves. Throughout the novel, Huckleberry is torn between what he has been told is right and what he knows is right in his heart. He finally throws off the ideas he was raised with and helps Jim escape. The novel ends with Huckleberry's return to his hometown, where he finds that his father has died. Jim is freed, and Huckleberry states his plan to head westward.