After the great war in Lanka was over and Ram and Sita were returning to Ayodhya,Ram realized that Sita had spent all her time at Valmiki's Ashram. To test her purity he asks her to go through an Agni Parkisha (walking through fire).
Sita took this as a grave insult specially as she had gone through an Agni Pariksha before the people of Ayodhya to prove her purity. She calls out to the Mother Earth and asks her to give her solace. The bhoomi breaks open and Sita is swallowed up within the ground.
One day a sage comes to Rama's room and asks to convey something crucial and personal to him. Lakshman being the loyal brother volunteers to guard the room allowing no one in.
The old sage was actually 'Kal Devata'Â or Time who had come in to remind Ram that his time on earth is over.
Just at that time another visitor arrives-Durvasa Maharishi who is well known for his hot temper demands an immediate conversation with Lord Rama. Lakshman absolutely confused whether to disobey his brother or a sage decides to leave.
Lakshman enters the Sarayu river and takes up the form of Ananta Sesha,the many-headed serpent.
On hearing about Lakshman's new avatar,Ram follows suit enters the river to end the Rama avatar and takes up the avatar of Vishnu. Thus on the same spot Lord Vishnu appears the preserver of the Universe.
Thus ends the Ram and Lakshman's avatar which takes up the form of the Vishnu and the Ananta Sesha, the many-headed serpent.