The Pergamum Codex was an ancient document containing the most complete prophecies about the Slayer's role in the end years. Rupert Giles believed that the book had been lost in the 15th century; however, Angel knew it was just "misplaced" and handed it to Giles in 1997. In the Codex was written that Buffy Summers would die at the hands of The Master and he would rise from his mystical prison — a prophecy that was technically fulfilled when the Master bit Buffy and left her to drown in a pool with her blood giving him the power to escape the sunken church. The prophecy, however, was not absolutely fulfilled, as Buffy was revived by Xander Harris, and subsequently killed the Master minutes after he returned to the surface.
Further study showed that some obscure passages were actually Latin translated from a demonic tongue. These passages included references to bacchanals, as well as spells.
In the Wishverse, Buffy Summers travelled to Sunnydale at the behest of Rupert Giles. The Slayer faced the Master, who ruled Sunnydale after breaking free of his prison, in battle but was overpowered by the ancient vampire, who snapped Buffy's neck, killing her instantly and fulfilling the Pergamum Codex's prophecy.