Siege of Trenzalore

The Siege of Trenzalore was a conflict which lasted 900 years, (PROSE: Tales of Trenzalore: The Eleventh Doctor's Last Stand) initiated by a message broadcast through time and space that no one could understand.

Foreshadowing
Towards the end of his farewell tour, the Eleventh Doctor wished to know the Silence's motive for engineering what appeared to be his fixed death at Lake Silencio. His search led him to Dorium Maldovar, whose severed, still living head he found at the Order of the Headless' Seventh Transept. Explaining to the Doctor that the Silence wished to avert his "dangerous" future, Dorium elaborated by telling him the prophecy, "On the fields of Trenzalore, at the fall of the Eleventh, when no living creature can speak falsely, or fail to answer, a question will be asked. A question that must never, ever be answered." Revisiting Dorium after escaping his death, the Doctor was reminded by Dorium that the future told in the prophecy was still waiting for him. (TV: The Wedding of River Song)

The beginning
The Papal Mainframe arrived at Trenzalore first and, recognising the significance of the message, created a force field around the planet to protect the small village there. Unknown to them, the Weeping Angels had already arrived and hid in the snow planetside. By the time the Eleventh Doctor arrived, hundreds of starships had gathered, including those of the Daleks, Cybermen, Sontarans, Slitheen, Judoon, Terileptils, Silurians, Ice Warriors, Autons, Krynoids, and the Mara. Mother Superious, Tasha Lem, assisted the Doctor and Clara Oswald in reaching the planet.

When the broadcast was revealed to be the First Question, sent from Gallifrey, trapped in a pocket universe and emanating through a crack in time and space, the Doctor refused to leave the planet to be destroyed by his enemies in space, all of whom would seek the destruction of the Time Lords. However, he also wouldn't bring the Time Lords back through the crack, fearing the Last Great Time War would start anew. Tasha Lem, changing the faith of the Papal Mainframe into the Church of Silence (to prevent the Doctor saying his name, bringing the Time Lords back and restarting the Time War), initiated the Siege of Trenzalore. (TV: The Time of the Doctor)

The conflict
Over the next three centuries each of the Doctor's enemies tried various means of penetrating the force field created by the Church of Silence, each time defeated by the Doctor's ingenuity. It was during this time that the Kovarian Chapter led by Madame Kovarian broke away from the Church, travelled back along the Eleventh Doctor's time stream and attempted to kill the Doctor so he would never reach Trenzalore. Their first attempt involved them blowing up the TARDIS which the Doctor prevented. However, in doing this, Kovarian and her faction ended up creating the cracks in time in the first place, effectively causing what they sought to prevent. The Doctor called this the Destiny Trap: "You can't change history if you're part of it." The fleets above Trenzalore made various attempts to sneak past the force field - such as the Sontarans using an invisibility cloak or the Cybermen using a low-tech wooden unit. (TV: The Time of the Doctor) This also incuded the Ice Warriors burying Christmas through an avalanche, (PROSE: Let it Snow) a blind Tsunami Snake, (PROSE: The Dreaming) a Krynoid. (PROSE: An Apple a Day...) and the Nestene Consciousness parachuted in the Autons. (PROSE: Strangers in the Outland)

The Daleks, however, turned their attention to the Church itself. After calling for reinforcements, they assaulted the Mainframe, turned everyone into Dalek puppets and penetrated the field afterwards, followed by the Cybermen and the other fleets. (TV: The Time of the Doctor) 750 years into the Siege the Mara entered Christmas and possessed the town's children, trying to force the Doctor to say his name and begin a new Time War, but the Doctor defeated them. (PROSE: The Dreaming) Allying himself with the Papal Mainframe's soldiers and Confessional Priests (now known as the Silents), the Doctor repelled each attack, and eventually all attackers had either been destroyed or had retreated save for the Daleks who continued to attack the village in Dalek fighter pods and a massive Dalek saucer. The Doctor, dying of old age by this time, made ready to sacrifice himself to the Daleks. However, when he was unexpectedly granted a new regeneration cycle by the Time Lords through the crack in time at the demand of Clara Oswald, he was quick to defy the Daleks, and used the excess energy from his thirteenth regeneration to destroy their forces, effectively ending the siege (TV: The Time of the Doctor) and changing the future he had previously been made aware of. ( TV : The Name of the Doctor )

Aftermath
With the Daleks defeated, the people of Christmas saved and the crack finally closed by the Time Lords, the Doctor retreated to his TARDIS. Despite being restored to a youthful appearance during his regenerative "reset" on the clock tower, he was still dying of severe old age. Before regenerating, he used the TARDIS telephone to send a parting message to Clara in the near future relative to his regeneration, as a way of easing the stressful experience of adjusting to his new incarnation, then reunited with the present-day Clara. (TV: The Time of the Doctor, Deep Breath) Freed from his obligations to both the Time Lords and the people of Christmas, the Doctor set the TARDIS in flight and made good his departure from Trenzalore. After saying an emotional farewell to his companion, he finally succumbed to his advanced age and regenerated into the Twelfth Doctor. (TV: The Time of the Doctor)

Alternate timeline
In an alternate timeline, the Time Lords never gave the Doctor a new regeneration cycle, and the Siege of Trenzalore ended in a victory for the Doctor's enemies with the Doctor himself dying. Trenzalore became a desolate, volcanic wasteland with its moons and rings destroyed and a battlefield graveyard covering the planet's surface for the millions who had died during the battle. The biggest of these graves was the Doctor's in the form of his dying TARDIS, which was suffering from what the Doctor called a "size leak". (TV: The Name of the Doctor)