information:highlighting, structural:expansion
In the underworld

Ra was thought to travel on the Atet, two solar barques called the Mandjet (the Boat of Millions of Years) or morning-boat and the Mesektet or evening-boat. These boats took him on his journey through the sky and the Duat – twelve hours of night which is also the literal underworld of Egypt. While Ra was on the Mesektet, he was in his ram-headed form. When Ra traveled in his sun-boat, he was accompanied by various other deities including Sia (perception) and Hu (command), as well as Heka (magic power). Sometimes, members of the Ennead helped him on his journey, including Set, who overcame the serpent Apophis, and Mehen, who defended against the monsters of the underworld. When Ra was in the underworld, he would visit all of his various forms.

Apophis, the god of chaos (isfet), was an enormous serpent who attempted to stop the sun-boat's journey every night by consuming it or by stopping it in its tracks with a hypnotic stare. During the evening, the Egyptians believed that Ra set as Atum or in the form of a ram. The night boat would carry him through the underworld and back towards the east in preparation for his rebirth. These myths of Ra represented the sun rising as the rebirth of the sun by the sky-goddess Nut; thus attributing the concept of rebirth and renewal to Ra and strengthening his role as a creator god as well.

When Ra was in the underworld, he merged with Osiris, the god of the dead.