Massacre in King's Landing

"Orders are orders."

- Lord Janos Slynt to Tyrion Lannister

The Massacre in King's Landing was an event during the War of the Five Kings. Acting on King Joffrey's orders, the City Watch of King's Landing led by Lord Commander Janos Slynt tracks down and murders all of the bastard offspring of the late King Robert Baratheon.

Prelude
After Joffrey learns of Robert's bastard children, as well as hearing the (unbeknownst to him, accurate) rumors that his real father is actually his own uncle Jaime Lannister, he realizes that his enemies may think that Robert's bastards have a better claim to the throne than he does. In response to this threat, he orders the City Watch of King's Landing to hunt down and kill all of the bastards.

Events
Under the leadership of Lord Commander Janos Slynt, the Watch carry out this mission. They enter the brothel owned by Lord Petyr Baelish in search of Mhaegen, whose infant daughter Barra is one of Robert's bastards. Slynt is unmoved when Ros reminds him that Littlefinger is Master of Coin and the source of his income, as he states that his orders come from someone who does not care what Littlefinger thinks. Mhaegan and Barra are soon located, and Slynt orders one of his men to kill the baby. When the man cannot go through with it, Slynt carries out the deed himself, leaving Mhaegen devastated and everyone else horrified.

Three boys are discovered in Flea Bottom, and two are stabbed while another is drowned. Another baby is killed in plain view of a crowd.

Tobho Mott is interrogated and reveals that Gendry has left the city as a recruit of the Night's Watch. He says that Gendry can be identified by his bull's head helm. Gendry and Arya Stark are travelling north on the Kingsroad with Yoren's recruits.

Aftermath
Ros struggles to continue her work as a prostitute having witnessed the murder of Barra. Petyr Baelish threatens her with a tale about selling an unhappy girl to a depraved customer in order to recoup his investment. He orders her to return happy after a night off.

Janos Slynt dines with acting Hand of the King Tyrion Lannister, who questions him about the massacre of the royal bastards. Slynt freely admits his involvement but will not reveal who ordered the attack. Tyrion has Slynt arrested and exiled to the Night's Watch and installs Bronn as Commander of the City Watch in his place. Cersei confronts Tyrion about his actions. He warns that she is losing the support of the people but she claims that she does not care. He concludes that Joffrey ordered the massacre, having initially suspected that it was Cersei.

In the books
In the A Song of Ice and Fire novels, the massacre of Robert Baratheon's bastards is ordered by Queen Regent Cersei Lannister (not Joffrey) shortly before the arrival of Tyrion Lannister the capital. This was not the first time Cersei ordered the death of a bastard child of her husband; according to Littlefinger, a pair of twins Robert fathered on a servant at Casterly Rock had previously been murdered (it is unknown if the story is true).

Barra is the only one reported to die in the books, while in the show at least four others of Robert's bastards were killed too.

Gendry is spared from the massacre because Varys had foreseen this would take place and arranged his escape from the city in Yoren's caravan.