In Vedic religion, Varuna or Waruna(Devanagari:वरुण, IAST:) is a god of the sky, of rain and of the celestial ocean, as well as a god of law and of the underworld. He is the most prominent Asura in the Rigveda, and chief of the Gods. In later Hinduism, he continued his dominion over all forms of the water element, particularly the oceans.
As a sky god, Varuna may either correspond to, or rule over, the dark half of the sky — or celestial ocean (Rasā), hence being also a god of rain — or represent the 'dark' side of the Sun as it travels back from West to East during the night.
The Atharvaveda portrays Varuna as omniscient, catching liars in his snares. The stars are his thousand-eyed spies, watching every movement of men.
In the Rigveda, Indra, chief of the Devas, is about six times more prominent than Varuna, who is mentioned 341 times. This may misrepresent the actual importance of Varuna in early Vedic society due to the focus of the Rigveda on fire and Soma ritual, Soma being closely associated with Indra; Varuna with his omniscience and omnipotence in the affairs of men has many aspects of a supreme deity. The daily Sandhyavandanam ritual of a dvija Aryan addresses Varuna in this aspect in its evening routine, asking him to forgive all sins, while Indra receives no mention.
Both Mitra and Varuna are classified as Asuras in the Rigveda (e.g. RV 5.63.3), although they can already be addressed to as Devas as well (e.g. RV 7.60.12), possibly indicating the beginning of the negative connotations carried by Asura in later times.
Varuna later became the god of oceans and rivers and keeper of the souls of the drowned. As such, Varuna is also a god of the dead, and can grant immortality. From the name Varuna comes the name Varun which means wind. He is attended by the nagas. He is also one of the Guardians of the directions, representing the west.
Faced with the dilemma of how to cross the ocean to Lanka, where his kidnapped wife Sita is held captive by the demon king Ravana, Rama (an Avatar of Vishnu) performs a penance (tapasya) to Varuna, the Lord of Oceans, fasting and meditating in perfect dhyana for three days and three nights. Varuna does not respond, and Rama arises on the fourth morning, enraged by the God's arrogance. With his bow and arrow, he angrily begins attacking the oceans with celestial weapons - burning up the waters and killing its life and creatures. The Vanaras (Monkeys) are dazzled and fearful at witnessing the enraged Rama demolish the oceans, and his brother, Lakshmana, prays to calm Rama's mind. Just as Rama invokes the brahmastra, considered the most powerful weapon capable of destroying all creation, Varuna arises out of the oceans. He bows to Rama, explaining that he himself was at a loss to answer Rama's question. Begging him not to destroy the oceans with the missile, he suggests that Rama re-direct the weapon at a demonic race that lives in the heart of the ocean. Rama's arrows destroys the demons, and establishes a purer, liberated environment there. Varuna promises that he would keep the oceans still for all of Rama's army to pass, and Nala constructs a bridge (Rama's Bridge) across to Lanka. Rama justifies his angry assault on the oceans as he followed the correct process of petitioning and worshipping Varuna, but obtaining the result by force for the greater good.
Since the mid-1900s, both Indologists and Iranists have endeavoured to project back the respective pantheons into the Indo-Iranian age. Among these efforts are several that attempt to identify what Vedic Varuna's Indo-Iranian predecessor may have been, and then descend via the other branch and so identify what this Indo-Iranian divinity has evolved into. What use such an intellectual exercise might have has been repeatedly questioned (e.g. Wright BSOAS 40.3:633), but ignoring these, present-day consensus considers Vedic Varuna to be descended from an Indo-Iranian *vouruna. What that divinity might have been like, or which divinity he evolved into in Iran remains a matter of debate. It should moreover be stressed that the identification applies to Indo-Iranian *vouruna and not Hinduism's Varuna. Linguistic cognateness does not imply similarity in nature or quality (eg daeva and deva).
Dumezil (Tarpeia 1947:33-113) sees Varuna represented as the Amesha Spenta Asha Vahishta "Best Righteousness", an opinion - with extensions - that Widengren (Die Religionen Irans, 1965:12-13) and Nyberg (Die Religionen des alten Iran, 1938:282ff) also follow.
Kuiper (IIJ I, 1957) proposes that none less than Ahura Mazda is a development from *vouruna-*mitra. The basis of Kuiper's proposal is that the equivalent of Avestan mazda "wisdom" is Vedic medhira, described in Rigveda 8.6.10 as the "(revealed) insight into the cosmic order" that Varuna grants his devotees. In Kuiper's view, Ahura Mazda is then a compound divinity in which the propitious characteristics of *mitra negate the unfavorable qualities of *vouruna.
It has also been observed that Varuna has the by-name Bhaga, that is - as Baga - attested in the Avesta. (eg Zimmer, Münchner Studien 1984:187-215) This would then be a cult epithet, the proper name having been forgotten - a not uncommon occurrence. This may be seen to be reflected in Artaxerxes III's invocation of ahuramazda ura mithra baga "Ahura Mazda, Mithra and the Baga" (Boyce, Acta Iranica 21, 1981:59-73).
In the Gathas, the hymns considered to have been composed by Zoroaster himself, the poet does not specify which of the divinities (aside from Ahura Mazda) he considers to be ahuras. While Ahura Mazda is uniformly "the mightiest Ahura" (eg Yasna 33.11), in the only two occurrences of the term where the word does not refer to Ahura Mazda, the poet uses the expression mazdasca ahurano (Yasna 30.9, 31.4). This phrase, generally understood to mean "the Wise [Mazda] One and the (other) Ahuras", is in "common opinion" (so Boyce 1984:159) recognized as being archaic and in which the other Ahuras are *mitra and *varouna. Boyce (Mithra the King and Varuna the Master, 2001) sees this supported by the younger Avestan dvandvah expression mithra ahura berezanta "Mithra and the High Lord", the latter being unambiguously Apam Napat, the third member of the Ahuric triad. (Gray, Foundations, 1929:15)
For each of the above identifications there are numerous counter-identifications and it is unlikely that a shared opinion will crystallize in the near future.