The Ashvamedha (Sanskrit: अश्वमेध aśvamedhá; "horse sacrifice") was one of the most important royal rituals of Vedic religion, described in detail in the Yajurveda (TS 7.1-5, VSM 22–25 and the pertaining commentary in the Shatapatha Brahmana ŚBM 13.1–5). The Rigveda does have descriptions of horse sacrifice, notably in hymns RV 1.162-163 (which are themselves known as aśvamedha), but does not allude to the full ritual according to the Yajurveda.
The Ashvamedha could only be conducted by a king (rājā). Its object was the acquisition of power and glory, the sovereignty over neighbouring provinces, and general prosperity of the kingdom.
The horse to be sacrificed must be a stallion, more than 24, but less than 100 years old. The horse is sprinkled with water, and the Adhvaryu and the sacrificer whisper mantras into its ear. Anyone who should stop the horse is ritually cursed, and a dog is killed symbolic of the punishment for the sinners. The horse is then set loose towards the North-East, to roam around wherever it chooses, for the period of one year (or half a year, according to some commentators). The horse is associated with the Sun, and its yearly course. If the horse wanders into neighbouring provinces hostile to the sacrificer, they must be subjugated. The wandering horse is attended by a hundred young men, sons of princes or high court officials, charged with guarding the horse from all dangers and inconvenience. During the absence of the horse, an uninterrupted series of ceremonies is performed in the sacrificer's home.