content: 
  ====''A Game of Thrones''====
  Soon after Eddard Stark's arrival in King's Landing, Varys warns him that Robert's wife Cersei Lannister intends to kill Robert and offers his help to Eddard in investigating the Lannisters. He later meets in secret with Illyrio to discuss stalling a war between Houses Stark and Lannister until the right moment; this is overheard by Arya Stark, but she is unable to identify the men. When Robert is ultimately killed, Varys remains spymaster for his heir Joffrey and suggests that Ser Barristan Selmy be blamed for Robert's death. Selmy is removed from the Kingsguard and ultimately defects to Daenerys Targaryen, which may have been Varys' plan all along. Varys visits Eddard in captivity and convinces him to plead guilty to treason and join the Night's Watch in order to save the life of his daughters Sansa and Arya, which would also avert war between the Starks and Lannisters, and Ned eventually agrees. Varys is horrified, however, when Joffrey has Ned executed anyway and tries in vain to dissuade the King whilst Littlefinger smugly looks on. In the aftermath, Varys arranges for Robert's bastard Gendry to join the Night's Watch, to avoid being killed by Cersei.