The Agnicayana ( "the building up of the fire altar") or Athirathram ( അതിരാത്രം ) is a category of advanced Śrauta rituals.
After one has established the routine of the twice-daily routine of Agnihotra offerings and biweekly dara-purna-masa offerings, one is eligible to perform the Agnistoma, the simplest soma rite. After the agnistoma, one is eligible to perform more extensive soma rites and Agnicayana rites. There are various varieties of Agnicayana.
Agnicayana continues to be performed in Kerala, Andhra.
The entire ritual takes twelve days to perform, in the course of which a great bird-shaped altar, the uttaravedi "northern altar" is built out of 1005 bricks. The liturgical text is in Chapters 20 through 25 of the Krishna Yajurveda. The immediate purpose of the Agnicayana is to build up for the sacrificer an immortal body that is permanently beyond the reach of the transitory nature of life, suffering and death that, according to this rite, characterizes man's mortal existence.
The ritual emerged from predecessor rituals, which were incorporated as building blocks, around the 10th century BCE, and was likely continuously practiced until the late Vedic period, or the 6th century BCE. In post-Vedic times, there were various revivals of the practice, under the Gupta Empire in the north (ca. 4th to 6th century), and under the Chola Empire in the south (ca. 9th century), but by the 11th century, the practice was held to have been discontinued, with the exception of the Nambudiris of Kerala. The 1975 Nambudiri Agnicayana filmed by Frits Staal, was criticized by Andhra Śrautins who claimed the Nambudiri omitted animal sacrifice, which is an element in their own opinion.