Tom and Huck capture several rats to put in Jim's cabin, but one of the Phelps boys finds the box and lets all of the rats free into the house. After several creatures are accidentally freed in the Phelps' house, Tom and Huck finally capture enough rats, spiders, and snakes, and put them in Jim's cabin. Jim complains that there is not enough room for him, and if he ever becomes free he "wouldn't ever be a prisoner again, not for a salary."
After three weeks, everything is finally ready for the grand escape. To finish off the scheme, Tom writes an anonymous letter to the Phelps saying that a "desperate gang of cutthroats" will attempt to steal Jim out of the cabin.
Huck returns to the house to pick up some butter and finds that the Phelps have gathered 15 men to battle the gang of cutthroats. Alarmed, Huck sneaks out the window and warns Tom that the men are here, and they must all escape immediately. When the men come to the cabin, Jim and the boys slip out of the hole and head for the river amidst shouts and gunshots. They make it to the raft but then discover that Tom has been shot in the calf. Tom tells them to shove off, but Jim will not leave until a doctor has looked at Tom.
The entire Phelps' household is in complete disarray when the escape actually begins. In this manner, the novel has moved even further from the peaceful tranquility of the raft and the river to the chaos of society and the shore. Symbolizing the clash between Romanticism and Realism, Huck and Tom continue to display juxtaposing approaches to the escape and the situation. The arrival of a town posse frightens Huck, but Tom is delighted. When Huck tells Tom that the house is full of men with guns, Tom replies, "Ain't it bully!" as if the entire escape is a dramatic work of fiction.
Although readers have already recognized Jim as compassionate and caring, Chapter 40 reinforces Jim's qualities of bravery and loyalty. When they discover that Tom has been shot, Jim adamantly refuses to leave and says, "I doan' budge a step out'n dis place 'dout a doctor; not if it's forty year!" The statement reinforces Jim as a heroic figure capable of sacrifice.
allycumpain elecampane, a tall, hairy perennial plant of the composite family, having flower heads with many slender, yellow rays.