Set in France during the early 19th century, the film tells the story of Jean Valjean, an ex-convict who, inspired by a kindly bishop, decides to turn his life around. He eventually becomes mayor of a local town and owner of its factory. He is always alert to the risk of being captured again by police inspector Javert, who is ruthless in hunting down law-breakers, believing they cannot change for the better. One of Valjean's factory workers, Fantine, blames him for her being cast into a life of prostitution. When she dies, he feels responsible and agrees to take care of her illegitimate daughter Cosette—though he must first escape Javert. Later, when Cosette is grown, they are swept up in the political turmoil in Paris, which culminates in the Paris Uprising of 1832.