Yajna or sacrifice was practiced from the earliest period of the Vedas. At first it referred to the external fire sacrifices and oblations that constituted the principal way in which Aryans related to their gods. Offerings were made to the fire (agni) of clarified butter (ghi or ghee), wood, spices, grains, soma (the ambrosia of immortality), and even animal sacrifices. Later sacrifices became vegetarian with the exception of Tantrics and Saktas.
Yajna as internal sacrifice was articulated as early as the Upanishads by equating the external fire with the internal heat (tapas) of mediation and, by further extension, the austerities (tapas, sadhanas) in order to acquire boons and powers (siddhis). Yajna is always associated with fire, both the physical fire that carries the offerings to heaven for the enjoyment of the gods or Agni, god of fire, as the divine messenger who transports prayers and offerings to their divine objects.
Yama, lord of death, riding his vahana, the water buffalo (TRIP)