According to Valmiki’s Uttara Ramayana, Rama ruled his kingdom from Ayodhya for 11 thousand years. The way he ruled his country was so prosperous, dharmic and wonderful that ‘Ramarajya’ as a word used to symbolize the best ideal of rule to emulate.
During Rama’s rule, all his subjects lead a virtuous life; there were no thiefs and there was no dacoity. There was no enemy attack on the kingdom. Dharmas and shastras were the guiding principles of life. Rishis and sadhus were the leading lights of the society. There was no draught, no floods or other natural calamities.
After Rama ruled Ayodhya for 11 thousand years, Lord Yama (Lord of Time) came to meet Lord Rama in disguise at the king’s palace in Ayodhya. He wanted a total private talk with Rama on an important matter. Rama asked Lakshmana to stand outside the doors as a guard to prevent anyone from entering the room and gave a warning that whomsoever intruded into the room during the private discussions would be killed by Him.
Once alone, Lord Yama conveyed Lord Brahma’s message that since the purpose of Lord Vishnu’s Avatar as Rama had been over after annihilating Ravana and also His wish to rule the kingdom for 11 thousand years too was over, it was now time for Rama to return to His heavenly abode as Vishnu, if he so wished to leave his earthly divine play.
Rama agreed that he too preferred to return to his abode rather than continuing in this world.
As the conversation was taking place, Rishi Durvasa came to the palace and wanted to meet Rama urgently. When Lakshmana told Durvasa about Rama being busy on an urgent matter, Rishi Durvasa, known for his short temper and capacity to curse people, threatened Lakshmana with dire consequences if he was not allowed to meet Lord Rama.
Lakshmana had to yield. He went into the room to inform Lord Rama about the arrival of Durvasa. Rama bade farewell to Lord Yama and came out to meet Durvasa. Durvasa wanted Rama to feed him sumptuously as he was in extreme hunger after doing a penance for a long time by taking fasting as a vow. Rama arranged it immediately.
However Rama became woeful as he had to keep his word that he had uttered earlier (that he would kill any intruder during his private talk with Yama). Taking a cue from the scriptures that said that renouncing a person is equivalent to killing that person, Rama, with heavy heart said to Lakshmana that he was renouncing all the ties with Lakshmana.
Lakshmana felt that his end had come. He went to River Sarayu and stopped his breath and entered into samadhi. He left his mortal body; his soul which was one fourth part of Lord VIshnu returned to the heavenly abode.
Grief stricken Rama called all his citizens and ministers and announced his decision to relinquish the kingdom and retire to the woods so as to leave his life like Lakshmana. He asked Bharata to take over the kingdom of Ayodhya. The devout Bharata stoutly refused the proposal as he too wanted to accompany Rama.
As advised by Bharata, Rama gave the Southern Kosala portion of the Kosala kingdom to his son to Kusa and the Northern Kosala zone to his son Lava to rule.
The entire population of Ayodya had no desire to live after their beloved Rama was no longer the king. They too expressed their desire to follow Rama.
News was sent to Satrughna, who was by that time ruling the kingdom of Mathura. Satrughna too had no desire to live if his beloved brother was gone. He handed over his kingdom (Mathura and Vidisha) to his two sons to rule and rushed to Ayodhya.
Having heard the news, Rama’s erstwhile associates and well wishers — Hanuman, Sugriva and his vanaras (monkeys), Jambavan and the other bears, Vibhishana and his loyal Rakshasas came to Ayodhya. All of them wished to go with Rama when he exited the earth.
However, Rama blessed Hanuman and Vibhishana to be Chiranjeevi’s — ever living. He wanted Hanuman to enjoy the company of devotees of Rama wherever they sang the glory of Rama. He wished Vibhishana to keep ruling the his kingdom of Sri Lanka. He blessed Jambavan and his five associates to live till Kaliyuga.
Sugriva said he had given charge of his kingdom to his son Angata and had no longer any desire to live. All the monkeys too said so.
Thus Rama, followed by Bharata, Satrughna, their families and servants, the ministers, the vanaras, bears and Rakshasas and the entire populace of Ayodhya with their cattle and birds left the city and went to the River Sarayu, chanting vedic hymns. None of them had any worries and every one was extremely happy. Whomsoever saw Rama leaving, including animals and creatures gleefully joined him so as to ascend to the heavenly abode.
All the celestial Gods headed by Lord Brahma had assembled at the skies near the river Sarayu to welcome their Lord. They chanted hymns praising their Lord Vishnu and welcoming him back.
Rama requested Lord Brahma to allow all his citizens, followers and lovers including the animals and creatures who had served him with respect and devotion into the heavenly world. Brahma said that he would accommodate all of them unmindful of any sins committed by them into the region known as Santanaka, which was next only to Brahma Loka. He also said all those celestial beings who had earlier taken up various forms and descended to earth to assist Rama in his activities of the avatar would regain their original divine forms.
All of them headed by Rama joyfully immersed themselves in the waters of Sarayu, left their bodies and ascended to the higher worlds.