King Neferkare and General Sasenet

The ancient Egyptian story of "King Neferkare and General Sasenet" survives only in fragments. With its atmosphere of nocturnal mystery and intrigue it is an early example of the literary cloak and dagger tradition. It is often cited by people interested in homosexuality and its history as being proof that a homosexual relationship existed between a pharaoh and one of his officers. On the other hand, literature often reflects social mores: the tale is censorious of the king's conduct which may well reflect the attitude of the people towards homosexuality. 
The story is dated to the late New Kingdom though it was composed earlier and purports to describe the nightly exploits of Pepi II Neferkare; some like R. S. Bianchi think that it is a work of archaizing literature and dates to the 25th Dynasty referring to Shabaka Neferkare, a Kushite pharaoh.
It contains a reference to the ancient myth of the sun god Rê and the god of the realm of the dead Osiris. These two gods existed in a relationship of interdependence: Osiris needing the light of the sun while Re, who had to cross the underworld during the night to reach the eastern horizon in the morning, needed the resurrective powers of Osiris. Their union took place during the four hours of deepest darkness – the same hours Neferkare is said to spend with his general.