Then he decides to become a historian and travels to Egypt. He wanders through the desert, passing the Colossi of Memnon and the Sphinx. As he addresses the Sphinx, believing it to be the Bøyg, he encounters the keeper of the local madhouse, himself insane, who regards Peer as the bringer of supreme wisdom. Peer comes to the madhouse and understands that all of the patients live in their own worlds, being themselves to such a degree that no one cares for anyone else. In his youth, Peer had dreamt of becoming an emperor. In this place, he is finally hailed as one — the emperor of the "self". Peer despairs and calls for the "Keeper of all fools", i.e., God.