An elaborate Vedic śrauta ritual, culminating in the sacrifice of a horse. First mentioned in the Ṛg Veda (but with parallels across Indo-European cultures), it is discussed at length in the Brāhamaṇas. Only a great king could initiate this ritual, the purpose of which was to extend and substantiate his power. It involved the release of a stallion, which, escorted by the king's army, was allowed to roam freely for a year across neighbouring territories in an assertion of sovereignty. On the horse's return, the king underwent a three day consecration, at the climax of which the beast was killed. The chief queen then simulated copulation with the corpse of the horse, following which the animal was dismembered and portions offered to Prajāpati and others. In this way the divine power and fertility of the horse were channelled, via the queen, to the king and his kingdom. In the opening of the Bṛhadāraṇyaka Upaniṣad, the bodily parts and actions of the sacrificial horse are equated to cosmic and natural entities such as the sun and the seasons.
In Book 14 of the Mahābhārata, the Aśvamedhikaparvan, Yudhiṣṭhira performs a horse sacrifice at the end of the war to atone for the Pāṇḍavas' destruction of their Kaurava cousins. This provides the occasion for Arjuna to fight many great battles as he escorts the horse in its wanderings across the entire earth. Historically attested performances of the aśvamedha after the Vedic period are rare.