content: 
  ==== Season 2 ====
  Joffrey's act worsens the situation with the Lannisters' war effort, as his uncle Jaime is captured by the Starks, and Joffrey's paternal uncles Renly and Stannis challenge his claim to the Iron Throne. Joffrey frequently orders his Kingsguard to beat Sansa. His cruelty and ignorance of the commoners' suffering makes him unpopular after he orders the City Watch to kill all of his father's bastard children in King's Landing; consequently, he is almost killed during a riot. When Stannis attacks King's Landing, Joffrey serves only as a figurehead and avoids the heavy fighting. When the battle eventually turns in Stannis' favor, Cersei calls her son into the safety of the castle, damaging the morale of his army. The battle is only won by his uncle Tyrion and grandfather Tywin, aided by the forces of House Tyrell. To cement the alliance between those families, Joffrey's engagement to Sansa is annulled so he can marry Margaery Tyrell.