The Book of Gates is the principal guidebook to the Netherworld. It first appeared in the tomb of the last king of the Eighteenth Dynasty. It was later found in the tombs of the Nineteenth and part of the Twentieth Dynasties of the New Kingdom. The book drives its importance from the role it played in allowing the dead pharaoh navigate his way along the Netherworld together with the Sun-god, so that his resurrection could be affected. It emphasizes gates with guardian deities whose names must be known in order to pass them. This is actually a very old tradition dating to at least the Book of the Two Ways in the Coffin Texts, where there are seven gates with three keepers at each.