Sri Ram requested sage Agastya to tell about the means by which he could become liberated from the sins of killing brahmins(Ravana and Kumbhakarna and their Progeny). Sage Agastya advised him to perform Ashwamedha-yagya. He also described the rituals of performing Ashwamedha Yagya--- "Get a horse of white colour and after worshipping it on Vaishakh Purnima leave it to wander freely. Tie a piece of paper on its forehead on which your name and other details are mentioned. Soldiers should follow that horse wherever it goes. You should fight a battle against any king who dares to stop the horse. You should lead a celibate life till the horse returns back to the same place from where it had been let loose. It is customary for the performer of Ashwamedha yagya to indulge himself in benevolent deeds till the completion of Ashwamedha yagya." Sri Ram agreed to perform Ashwamedha yagya. He went to the seashore accompanied by numerous sages. He then cultivated a vast expanse of land with the help of a golden plough. A large oblation site was constructed and thus began Ashwamedha yagya under the supervision of Vashishth.
https://www.kamakoti.org/kamakoti/details/padmapurana26.html
https://www.kamakoti.org/kamakoti/details/padmapurana26.html