Huck's estrangement from his father and subsequent escape to the river leave him vulnerable and in need of an authority figure. Huck's companionship with Jim takes on the attributes of a father-son relationship, as he seeks comfort in the runaway slave as a guardian and protector.
In the Mark Twain classic book, "Adventures of Huckleberry Finn," the relationship between Huck and Jim seems unlikely, but their situation requires them to cooperate and trust each other if they are to survive. At first, Huck views Jim as simple and gullible, but as their relationship develops Huck comes to see Jim as a reliable and trustworthy companion; someone who has common sense and makes the right decisions.
As the pair travel down the river and work together to escape numerous dangerous situations, it becomes increasingly clear to readers that there is real affection between the man and boy and that for Huck, Jim has replaced the missing father figure in his life.
Jim's selflessness, affection and honesty provide Huck with a feeling of safety and relief from the outside world as they continue down the Mississippi on the raft that acts as their home. Jim's paternal feelings toward Huck are enhanced because of the forced separation he experienced from his own family.