After Sita was swallowed by the earth, Ram performed his kingly duties until finally he was informed by the gods that the time had come for him to leave the earth and return to Vaikunth. He divided his kingdom amongst his sons and then walked into the Sarayu to discard his mortal flesh.