<P> Theon is introduced as the hostage and ward of Lord Eddard Stark, stemming from the failed Greyjoy Rebellion . Despite his position, he remains loyal to Eddard and is good friends with his sons Robb and Jon . While he has never questioned his position, he soon begins to have doubts after Tyrion Lannister tells him he is nothing more than a servant to the Starks and that not everyone respects him . Nevertheless, Theon initially remains loyal to Robb after he goes to war with the Lannisters and supports his decision to have the North secede from the Seven Kingdoms and form their own kingdom . </P> <P> Theon is sent to the Iron Islands to persuade Balon to ally with the Starks against the Lannisters, but Balon instead intends to conquer the North while its army is fighting in the Westerlands . Theon is insulted when he is given command of a single ship to raid the Stony Shore and contemplates sending a warning to Robb, but ultimately decides to remain loyal to his family . When his crew proves to be disrespectful of Theon's station, his first mate Dagmer Cleftjaw suggests that Theon prove himself by capturing Winterfell . Theon lures the Stark garrison away from Winterfell and easily captures the castle, but is forced to execute his old mentor Ser Rodrik Cassel when he refuses to yield . Theon is seduced by the wildling servant Osha, who later frees Bran and Rickon Stark . Theon's men are unable to recapture the two and Theon kills two farm boys to pass their bodies off as those of the Stark boys, an act he soon feels guilty for . </P> <P> Theon asks his sister Yara to bring 500 men as reinforcements, but instead she arrives with a paltry force to warn Theon of his unstable position and to return to the Iron Islands . Theon refuses, and soon afterwards Winterfell is besieged by men of House Bolton commanded by (the then unnamed) Ramsay Snow, bastard son of Lord Roose Bolton . Theon attempts to rally his men to fight to the death, but they knock him out and hand him over to Ramsay, hoping for amnesty . Unknown to the viewer, Ramsay disobeys his orders to free the Ironborn and instead flays them all and sacking Winterfell, before taking Theon back to the Dreadfort as prisoner . </P> <P> Theon is taken captive and kept in an unknown castle, where he is briefly tortured, but later manages to escape with the help of a serving boy who claims to work for his sister Yara . He is brought back to the very castle he escaped from, the serving boy proving to actually be his captor and torturer, Ramsay Snow, Lord Bolton's sadistic bastard child . Theon is subsequently brutally tortured, flayed and castrated by Ramsay, who forces him to rename himself Reek, and beats him until he submits to his new name . Theon's penis is sent in a box to his father, with Ramsay threatening to mutilate Theon further unless the Ironmen retreat from the North . Balon refuses, as Theon defied him and is now unable to further the Greyjoy line . Outraged, Yara responds that she intends to save her brother on her own accord . </P>

Who captured theon greyjoy at the end of season 2