Overview
"Before the Flood" is the fourth episode of the ninth series of the British science fiction television series Doctor Who. It was written by Toby Whithouse and directed by Daniel O'Hara. It was first broadcast on 10 October 2015, and is the second part of a two-part story; the first part, "Under the Lake", aired on 3 October.
Set in Scotland in 1980 and 2119, the episode is a "bootstrap paradox" where the alien time traveller the Twelfth Doctor (Peter Capaldi) prevents the invasion plot of an alien called the Fisher King (Neil Fingleton and Peter Serafinowicz) while also saving the life of the Doctor's companion Clara (Jenna Coleman) in the future through the use of information the Doctor received that he would later send to himself.
Plot
The Twelfth Doctor, O'Donnell, and Bennett arrive in a Scottish town in 1980, before the town was flooded, and the day the salvaged alien craft from the future landed. O'Donnell and Bennett observe the ship still has the stasis chamber, both power cells, and the absence of glyphs on the walls. They are met by Prentis, a Tivolian funeral director whom O'Donnell recognises as one of the ghosts in the future. Prentis landed on the "barren" planet Earth to bury the Fisher King, a former enslaver of the Tivolians.
A ghost of the Doctor has appeared outside the mining facility near the flooded town in 2119, mouthing a set of names, those of the crew, Prentis, the Doctor, and Clara. Clara relays this to the Doctor in the past, who laments he now knows his future. During this, the still-alive Fisher King escapes the ship, leaving the slab he laid on, kills Prentis, scratches the glyphs into the walls, and takes the stasis chamber from the ship to the church. O'Donnell is killed, and the Doctor confirms his theory that his ghost's list is the order in which they will die. When the Doctor and Bennett try to return to the future to save Clara, the TARDIS sends them back half an hour.
From Wikipedia (CC BY-SA 4.0).