Despite the disapproval of the adults in St. Petersburg, Tom Sawyer and Huckleberry Finn are close friends. Huckleberry Finn is an outcast, the son of the local drunk, but his mischievous nature and freedom to live as he likes appeal to the children in the community, including Tom. Though Tom is punished by his teacher for even speaking with Huck, he continues to spend time with him anyway.
The friendship between the two boys is a strong one. The duo treasure imaginative play, pretending to be pirates and robbers. Though they appear to be opposites, they complement one another: Tom is imaginative and book-smart, while Huck is daring and assumes a devil-may-care attitude regarding the rules of the civilized world. The two mutually admire and even envy one another, though this never spills over into malicious feelings.
Social disapproval only seems to make Tom cling more tightly to Huck. Though he too is an orphan, Tom pities Huck for having no guardian to properly care for him, especially when there is no one present to greet him at the boys' funerals. By the end of the book, he tries to find Huck a good home and convince him to live with the Widow Douglas in order to become civilized.