Warning: Major spoilers from last night's "Game of Thrones" finale, and potential spoilers for future episodes, are ahead!

It's said that a Lannister always pays his debts. True to his house's reputation, Tyrion made sure to repay the man who tortured him for all of his life — his cunning and ruthless father, Tywin Lannister — not with gold, but with an arrow to the gut.

While all attention and expectations centered on Tyrion losing his life in the "Game of Thrones" season finale, in the end, it was his father, Tywin, who paid the price. Charles Dance's ice-cold mobster-in-lion's-clothing is no more, the price he pays for years of oppressing his youngest and smartest son for the unforgivable crime of being a dwarf.

And it wasn't just Tywin who lost his life — Shae, too, met her maker at the hands of Tyrion. It was a bloody, horrific way to end Tyrion's season four storyline, leaving plenty of questions hanging in the air as we start to think about season five.

Of course, Tyrion's murderous acts didn't catch book-readers off guard. They were waiting for this moment for quite some time. If you're curious, here's how Tyrion's rampage plays out in "A Storm of Swords," the third novel in George R.R. Martin's "A Song of Ice and Fire" series.

Some time after the Red Viper's demise at the hands of the Mountain, Tyrion lurks in his prison cell, awaiting his inevitable execution. He wakes up to the sound of an approach, and realizes his time must be up.

He wondered whether they would kill him down here in the dark or drag him through the city so Ser Ilyn Payne could lop his head off. After his mummer's farce of a trial, his sweet sister and loving father might prefer to dispose of him quietly, rather than risk a public execution. I could tell the mob a few choice things, if they let me speak. But would they be that foolish?

As the footsteps draw nearer, Tyrion begins thinking about retaliation:

I can still bite and kick. I'll die with the taste of blood in my mouth, that's something.

When the door to his cell opens, Tyrion is surprised to see his brother, Jaime. Unlike on the show, this is the first time that Tyrion and Jaime have seen each other since the events of "A Game of Thrones" — or season one, on the show. They note each other's wounds — Jaime's missing hand, Tyrion's scarred up face from the Battle of the Blackwater — before Jaime tells him the score:

"You're to be beheaded on the morrow, out on the old tourney grounds."

Tyrion tries to make light of the situation, asking Jaime for help crafting his last words, as his "wits have been running about like a rat in a root cellar."

Jaime tells Tyrion that it's three past midnight, and all of King's Landing is asleep. Now is the time for escape. As they exit Tyrion's cell, Tyrion notices that the guards are unconscious. He asks Jaime if they're dead, to which the Kingslayer replies:

"The eunuch dosed their wine with sweet sleep, but not enough to kill them. Or so he swears. He is waiting back at the stair, dressed up in a septon's robe. You're going down into the sewers, and from there to the river. A galley is waiting in the bay. Varys has agents in the Free Cities who will see that you do not lack for funds."

Tyrion thanks Jaime for helping him escape, but Jaime says he doesn't require any thanks; it was a debt he needed to repay. Tyrion presses him on the matter, and Jaime finally lets the cat out of the bag — it all comes back to Tysha, the girl Tyrion married in his youth, who he later learned was a prostitute Jaime hired to make Tyrion feel valued. But as it turns out…

"She was no whore. I never bought her for you. That was a lie that Father commanded me to tell. Tysha was … she was what she seemed to be. A crofter's daughter, chance met on the road."

Tyrion is heartbroken. Already bitter by his recent experiences, Jaime's revelation absolutely devastates him. Jaime tries to defend his actions — "[Father] said that you required a sharp lesson. That you would learn from it, and thank me later" — but Tyrion isn't having any of it.

" Why should I believe you about anything, ever? She was my wife!"

"Tyrion—"

He hit him. It was a slap, backhanded, but he put all his strength into it, all his fear, all his rage, all his pain. Jaime was squatting, unbalanced. The blow sent him tumbling backward to the floor. "I… I suppose I earned that."

"Oh, you've earned more than that, Jaime. You and my sweet sister and our loving father, yes, I can't begin to tell you what you've earned. But you'll have it, that I swear to you. A Lannister always pays his debts."

So quite a bit different from what happens in the episode, where Jaime and Tyrion leave on good terms. Part of the reason for this is probably that Tysha isn't really played up as heavily in the show, but it certainly changes the intention of the scene. But it only veers off even more...

Tyrion pushes on down the tunnels to find Varys, but before he leaves, Jaime wants to know the truth from Tyrion: Did he really kill Joffrey, as charged? Tyrion then lists out all of Joffrey's many atrocities (including that he was the one who sent the assassin to kill the unconscious Bran Stark back in Winterfell; a revelation the show shied away from), putting all of those crimes right at Jaime's feet. "A son takes after his father," he says, before making the cold, false claim:

Tyrion watched him go, striding on his long strong legs, and part of him wanted to call out, to tell him that it wasn't true, to beg for his forgiveness. But then he thought of Tysha, and he held his silence. He listened to the receding footsteps until he could hear them no longer, then waddled off to look for Varys.

Tyrion finds Varys down the tunnels, and chews him out for his false testimony during the trial. But Varys is here to make amends; he tells Tyrion that there has been no sign of Sansa since Joffrey's assassination, and that there's little time left to get Tyrion to safety.

As they move deeper into the tunnels, Tyrion pauses at a familiar sight. Looking at his surroundings, he recalls stories that Shae once told him about how Varys would sneak her to the Tower of the Hand. Tyrion realizes that they're right underneath the Hand's chambers — and he decides to pay his father a visit.

"My lord, you are too weak for such follies, and there is besides no time. We must go."

"I have business above. How far [must I climb]?"

"Two hundred and thirty rungs, but whatever you intend —"

"Two hundred and thirty rungs, and then?"

"The tunnel to the left, but hear me—"

"How far along to the bedchamber?" Tyrion lifted a foot to the lowest rung of the ladder.

"No more than sixty feet. Keep one hand on the wall as you go. You will feel the doors. The bedchamber is the third." He sighed. "This is folly, my lord. Your brother has given you your life back. Would you cast it away, and mine with it?"

"Varys, the only thing I value less than my life just now is yours. Wait for me here."

Again, vastly different, with Tyrion's decision to go to visit his father more of a split second change of mind in the show, than the calculated plan in the book.

Speaking of which, in the book Tyrion climbs up to the Hand of the King's bedchamber — a painful climb for any man, but especially for Tyrion with his stunted limbs and his lack of mobility over the past several weeks. When he comes out, he finds a familiar face in his old bed: Shae.

Big wet tears filled her eyes. "I never meant those things I said, the queen made me. Please. Your father frightens me so." She sat up, letting the blanket slide down to her lap. Beneath it she was naked, but for the chain about her throat. A chain of linked golden hands, each holding the next.

Tyrion asks Shae if she ever enjoyed their time together — if she ever cared for his embrace, if she ever truly loved him. The answer she gives doubles as her own death sentence.

"More than anything," she said, "my giant of Lannister."

That was the worst thing you could have said, sweetling.

Tyrion slid a hand under his father's chain, and twisted. The links tightened, digging into her neck. "For hands of gold are always cold, but a woman's hands are warm," he said. He gave cold hands another twist as the warm ones beat away his tears.

In the show, of course, Shae and Tyrion don't even talk. It's all in their looks that conveys Tyrion's betrayal, and Shae grabbing a knife only seals the deal.

With Shae dead, Tyrion turns his attention to his father's nearby arsenal. He ignores a pole axe, as it would be too unwieldy in such close quarters. He considers a mace, but it's out of reach. But there's a crossbow nearby, with "a large wood-and-iron chest placed against the wall directly under" the weapon. He grabs the crossbow, loads it up, and sets out to find his "loving father."

He found his father where he knew he'd find him, seated in the dimness of the privy tower, bed robe hiked up around his hips. At the sound of steps, Lord Tywin raised his eyes.

Tyrion gave him a mocking half bow. "My lord."

"Tyrion." If he was afraid, Tywin Lannister gave no hint of it. "Who released you from your cell?"

"I'd love to tell you, but I swore a holy oath."

Tywin deduces that Varys is behind Tyrion's escape. He commands his son to lower the crossbow, but Tyrion refuses to listen. Tywin attempts another tactic:

"This escape is folly. You are not to be killed, if that is what you fear. It's still my intent to send you to the Wall, but I could not do it without Lord Tyrell's consent. Put down the crossbow and we will go back to my chambers and talk of it."

Unfortunately for Tywin, Tyrion isn't interested in negotiations. ("It's bloody cold up there, and I believe I've had enough coldness from you," he tells him.) The only thing Tyrion wants is to know the answer to one simple question — he feels Tywin owes him that much.

"I owe you nothing."

"You've given me less than that, all my life, but you'll give me this. What did you do with Tysha?"

"Tysha?"

He does not even remember her name. "The girl I married."

"Oh, yes. Your first whore."

Tyrion took aim at his father's chest. "The next time you say that word, I'll kill you."

"You do not have the courage."

"Shall we find out? It's a short word, and it seems to come so easily to your lips."

Tywin eventually reveals that he did not have Tysha killed. In fact, he doesn't really know what happened to her. He assumes "the steward sent her on her way. I never thought to inquire." When Tyrion asks Tywin where the steward sent her, Tywin gives the worst answer possible:

"Wherever whores go."

Tyrion's finger clenched. The crossbow whanged just as Lord Tywin started to rise. The bolt slammed into him above the groin and he sat back down with a grunt. The quarrel had sunk deep, right to the fletching. Blood seeped out around the shaft, dripping down into his pubic hair and over his bare thighs.

Again, given how Tysha has been downplayed in the show, it's not a surprise that Tywin's demise comes from a different source. Still, the intention is similar.

As Tywin bleeds out, he spits out his final words: "You… you are no… no son of mine." But Tyrion says he's absolutely Tywin's son. "Why, I believe I'm you writ small. Do me a kindness now, and die quickly. I have a ship to catch."

For once, his father did what Tyrion asked him. The proof was the sudden stench, as his bowels loosed in the moment of death. Well, he was in the right place for it, Tyrion thought. But the stink that filled the privy gave ample evidence that the oft-repeated jape about his father was just another lie.

Lord Tywin did not, in the end, sh— gold.

What did you think of Tywin and Shae's death scenes? Prefer the book version, or the TV version?