What happened next happened very speedily. They were about to board the steamer when a boat containing Compeyson and some police shot out from the bank, Compeyson calling on Magwitch to surrender. The two boats clashed together, and the steamer, unable to stop, ran them both down. At the same moment Magwitch seized Compeyson and they went into the water together.
When Pip came to himself the steamer had gone, his own boat had sunk and he and Herbert had been dragged aboard the other. A few minutes later Magwitch was picked up, badly injured in the chest, and was handcuffed. But they did not find Compeyson—the other had killed him in that fearful struggle under water.
That night Magwitch was lodged in jail. Before many days he was tried for returning to England and was sentenced to be hanged. But it was clear before the trial ended that his injury would never let him live to suffer this penalty.
And now, as he saw the convict lying day by day drawing nearer to death, calling him "dear boy" and watching for his face, all the loathing and repugnance Pip had felt for him vanished away. He had sat beside the sick man at his trial; now he sat beside his cot each day in his cell, holding his hand. He knew there could be no longer any possibility of his taking the fortune the convict would leave, for, being condemned to death, all Magwitch's property went to the Crown. But he did not tell this to Magwitch.
One thing he discovered, however, which he told the dying man. This concerned Estella. As the film of death came over the convict's face Pip said:
"Dear Magwitch, you had a child once, whom you loved and lost. She is living still. She is a lady and very beautiful. And I love her!" And hearing this last glad news, Magwitch died.
Before this happened Herbert had left England for Egypt where his business took him. Left alone, after the strain, Pip fell sick of a fever and in the midst of this found himself arrested for debt.
That was the last he knew for many weeks. When he came to himself he found Joe, the true-hearted blacksmith, nursing him. He had paid Pip's debts. Miss Havisham was dead and Orlick had been sent to jail for robbing Uncle Pumblechook's house.
Joe's faithfulness smote Pip with a sense of his own ingratitude. After a visit to the old forge with Joe and Biddy, now Joe's wife, Pip felt how true were the old friends. He buried for ever the past false pride and folly and knew himself for all his trials a nobler man.
He sailed to Egypt, where he became a clerk in Herbert's business house, and finally a partner, and it was eleven years before he was in England again.