Destruction of the Great Sept of Baelor

The Destruction of the Great Sept of Baelor is an event that occurred in King's Landing late in the War of the Five Kings. In order to evade her trial and get revenge on her recent enemies, Queen Cersei Lannister has the Great Sept of Baelor destroyed by wildfire shortly after the trial of Ser Loras Tyrell. As a result, the main branch of House Tyrell is killed off, with the exception of Olenna Tyrell, who fled the city days before the explosion; as well as most, if not all, of the Sparrows, including the High Sparrow, the High Septon of the Faith of the Seven; Ser Kevan Lannister, the Hand of the King; most of the members of the Royal Court; and the entirety of the Small Council save for Qyburn. Septa Unella survived after being abducted by Cersei. Shortly after witnessing the massacre and hearing of the deaths, King Tommen I kills himself by jumping out of a window in the Red Keep. Cersei is later crowned Queen of the Andals and the First Men following Tommen's death.

The Mad King
"Aerys saw traitors everywhere, so he had his pyromancers place caches of wildfire all over the city. Beneath the Sept of Baelor and the slums of Flea Bottom. Under houses, stables, taverns. Even beneath the Red Keep itself!"

- Jaime Lannister to Brienne of Tarth

During Robert's Rebellion, in which several noble houses rose up in rebellion against King Aerys II Targaryen, the Mad King commissioned the Alchemists' Guild to place caches of wildfire underneath King's Landing. In the event that the rebels were to take the city, he intended to burn it down, killing all of its inhabitants in the process. House Lannister eventually did sack the city in the name of Robert Baratheon. Aerys II then gave the order to his Hand, Wisdom Rossart. However, before the order could be carried out, Ser Jaime Lannister of the Kingsguard murdered Rossart and then Aerys II, saving the city and its inhabitants from total annihilation. In the intervening years, the Alchemists' Guild recovered and disarmed most of the hidden caches, but not all of them.

Rise of the Sparrows
After Robert's death, the War of the Five Kings saw destruction and death all across the country. In response to this, a cult of the Faith of the Seven formed, the Sparrows, led by a man known as the High Sparrow. Following the death of Lord Tywin Lannister, the Sparrows found their way into King's Landing, preaching their extreme beliefs.

Cersei plotted to shrink the power of House Tyrell, which has amassed considerable influence over the Iron Throne due to their military support at the Battle of the Blackwater and Margaery Tyrell's marriage to King Joffrey I and later Tommen I after Joffrey's death. After the Sparrows have the High Septon partake in a walk of atonement, Cersei names the High Sparrow as the new High Septon in her son Tommen's name. She also reestablishes the Faith Militant, allowing the Sparrows to deliver their version of justice across the realm "in the eyes of the Seven". Soon after, Cersei informs the High Sparrow of a "great sinner in their very midst": her formerly betrothed, Ser Loras Tyrell. Loras is arrested by the Faith Militant; later, a hearing is held for Loras, which is attended by King Tommen, Cersei, Queen Margaery, and Olenna Tyrell, Loras' and Margaery's grandmother. Margaery testifies for Loras, stating that he has not laid with other men. However, Olyvar, a former squire of Loras' and secretly in the employment of Petyr Baelish, testified that he slept with Loras and even had Margaery walk in on them once, seemingly not surprised. He proves this by describing a birthmark on Loras' upper thigh. Loras is imprisoned, as well as Margaery for lying before the gods.

As expected, Cersei is pleased with these results. However, Cersei is later imprisoned by the Sparrows as well after Brother Lancel confesses to having slept with her. Cersei is accused of multiple crimes, including murdering King Robert I and committing incest; however, she only pleads guilty to some of these crimes. For confessing, she is allowed to return to the Red Keep to reunite with her son; however, she is forced partake in a walk of atonement from the Great Sept of Baelor to the Red Keep, as she has yet to confess to all the crimes she is accused of.

Cersei's Revenge
Cersei loses her power as a result of her arrest, and her uncle Ser Kevan Lannister is called back by Grand Maester Pycelle to serve as the new Hand of the King for King Tommen.

Cersei begins to plot her revenge against the Sparrows. As she has yet to confess to all of her crimes, a formal trial is to be held for her. Cersei intends to use the revived Gregor Clegane, her new Kingsguard, to serve as her champion in a trial by combat. However, she also wants to smooth relations between the Lannisters and the Tyrells. She and Jaime both convince Olenna Tyrell to allow the Tyrell army to march into King's Landing to prevent Margaery Tyrell from having to participate in her own walk of atonement, and convince Kevan to keep the gates open, using his son, Lancel Lannister (now "Brother Lancel"), as a method of persuasion.

Shortly before Queen Margaery's walk of atonement, the Tyrell army arrives with Lord Mace Tyrell and Ser Jaime Lannister of the Kingsguard at its command. However, the High Sparrow declares that Margaery's punishment has been revoked for her help in forming a new holy alliance between the Faith of the Seven and the Iron Throne, as King Tommen emerges from the Sept as a new convert. For "attacking the Faith," Tommen dismisses Jaime Lannister from the Kingsguard and orders him to besiege Riverrun for House Frey in the Riverlands, which has been retaken by Ser Brynden Tully "the Blackfish". Though Jaime is concerned for Cersei, she reassures him that the Mountain will defend her in her trial by combat.

Cersei's plan is thwarted, however, when after conferring with the High Sparrow, King Tommen abolishes trial by combat across the Seven Kingdoms, after announcing the date for the trials of Ser Loras and Cersei. Seeing no other option, Qyburn informs Cersei that his "little birds" have confirmed a rumor.

The Destruction
On the day of the trials of Loras and Cersei, Cersei fails to appear at the Great Sept. Having found out that caches of wildfire were placed in the tunnels beneath the Sept (by the orders of the Mad King during Robert's Rebellion), she plans to set them alight and destroy the Sept, subsequently killing the High Sparrow and the rest of the Sparrows. Three burning candles are placed in a pool of wildfire, the flames getting closer to the extremely flammable substance as the candles melt. By the time Loras's trial has ended, Queen Margaery senses that something is amiss as neither Cersei nor Tommen have arrived. She tries to leave the Sept, along with her brother, father, and the rest of the assembly, but the Sparrows prevent them from doing so, as the High Sparrow dismisses her concerns, and insists that the trial must continue. The wildfire plot is discovered by Brother Lancel after being led into the tunnels and severely injured by one of Qyburn's "little birds". His injury keeps him from getting to the candles in time, and he is the first to be killed as the pool ignites, starting a chain reaction.

Dozens of barrels of wildfire ignite and explode, flooding the tunnels with fire. As Margaery locks eyes with the High Sparrow for the last time, the fire punches through the seven-point star mosaic floor directly where the High Sparrow was standing, killing him instantly. The statues of the Seven crack and shatter under the force of the explosion and the flames spread everywhere, killing the entire assembly. The elaborate windows explode outwards, and the ancient stonework shatters as the explosion peaks, the shockwave obliterating all structures within a mile of the Great Sept. A bell from one of the Sept's towers is flung into a building before crashing into the street below, killing a number of civilians. The flames spread out from the epicenter, incinerating everyone and everything in the surrounding area. As smoke and the screams of the terrified populace fill the air, Cersei looks on from her chamber in the Red Keep with great satisfaction, while Tommen, who was forced to remain in the Red Keep by Ser Gregor, watches on with shock and horror as the shattered remains of the once magnificent Sept crumble to the ground.

Aftermath
"Cersei stole the future from me. She killed my son. She killed my grandson. She killed my granddaughter. Survival is not what I'm after now."

- Olenna Tyrell

The destruction of the Great Sept has led to many far-reaching consequences. House Lannister has been pushed further to the brink of collapse with the deaths of Ser Kevan Lannister and his sole remaining son, Lancel, in the explosion. The deaths of Mace Tyrell and Grand Maester Pycelle wiped out the remainder of the Small Council that were not Cersei's allies or sycophants. In addition, the entire leadership of the Faith of the Seven has been destroyed, including the High Sparrow and the Faith Militant, crippling the church's power in the realm. A large number of the royal court and minor nobles or representatives of lesser or vassal Houses were also killed, as well as many innocent civilians caught in the blast or killed by debris. Finally, King Tommen was driven to commit suicide out of grief from the deaths of his wife, extended family, and so many innocents. With his death, Cersei is crowned as the first Queen of the Andals and the First Men since Rhaenyra Targaryen. Jaime returns to King's Landing just as Cersei is taking the throne. His expression is grim as he watches his sister become the newly-seated Queen. King Tommen's death also marks the official extinction of House Baratheon, even though he wasn't a true Baratheon.

The most dramatic consequence, however, is that House Tyrell, the only participating Great House to have suffered no major losses during the War of the Five Kings (House Arryn remained neutral), has been eradicated with the deaths of Margaery, Mace, and Loras, prompting an enraged and devastated Lady Olenna Tyrell, who is a Redwyne by birth, to withdraw the Reach from the sovereignty of the Iron Throne. Seeking vengeance on Cersei, Olenna accepts an offer of alliance with the similarly-wounded de facto ruler of Dorne, Ellaria Sand, who reveals that she is working with Varys in preparing for the return of House Targaryen to the Seven Kingdoms. When Daenerys Targaryen and her armada set sail for Westeros, ships of Dorne and the Reach can be glimpsed amongst the black Targaryen sails. There is a strong possibility that Ellaria and the Sand Snakes could face justice for poisoning Cersei's daughter Myrcella now that her uncle Tyrion, Cersei's brother, has been named Hand of the Queen by Daenerys, which could in turn hinder her plan to take back the Seven Kingdoms for House Targaryen.

Still, for all intents and purposes, Cersei's actions have most likely doomed her reign before it even began now that House Arryn under Petyr Baelish has allied itself with the resurgent Kingdom of the North, House Frey is facing chaos due to the deaths of Walder Frey and two of his sons, and House Tyrell and its bannermen are part of Daenerys's already massive forces.

Fandom
In keeping with the traditional fandom name for the "Purple Wedding", itself derived from the in-universe name Red Wedding, the destruction of the Sept is referred to by fans as the "Green Trial" in reference to the color of wildfire.

In the books
In A Song of Ice and Fire novels there is no parallel scene, because that storyline has surpassed them.

By the point the books reached, ever since Cersei peformed the walk of atonement - she has been stripped of all powers and henchmen, confined to her rooms and under guard all the time, forbidden of receiving visitors without Kevan's permission, unable to walk around freely and intimidate people as she did in the show; whatever plots she has in mind - she is unable to execute them.

Mace, Margaery, Lancel, the High Sparrow and Tommen are alive.

Loras is lying near death, but it is not Cersei's fault - he volunteered to resolved the siege of Dragonstone, and subsequently was gravely injured as a result of his rashness, just as Cersei hoped.

Margaery and her cousins were released to Randyll Tarly's custody, since the case against them is weak and the witnesses Cersei arranged against them are proved to be false.

Kevan and Pycelle have been murdered, but Cersei and Qyburn had nothing to do with that - it was Varys, who killed them because they have been acting to undo Cersei's mistakes and restore the peace. As Kevan dies, Varys explains that his death will undermine the alliance between the Lannisters and Tyrells and open the way for a Targaryen, who is likely not to appear in the show (it's not Daenerys or Jon Snow) to retake the Iron Throne.

The only time in the novels where Cersei has used wildfire is in A Feast for Crows, where she burns the Tower of the Hand shortly after Tywin's funeral. She announces her intention to do that in advance, and no one is harmed.