of Avanti, was a son of Aditya-dasa, and studied at Kapitthaka through the boon of the sun god. Ancestry Varāhamihira's father Aditya-dasa likely trained him in jyotisha (Indian astrology and astronomy), as suggested by the Brhaj-jataka stanza and the opening stanza of Pancha-siddhantika. Varāhamihira's commentator Utpala calls him "Magadha-dvija". According to one interpretation, this means that Varāhamihira was a Brahmin (dvija), whose ancestors belonged to the Magadha region. According to another theory, the word "Magadha" in this context refers to the sun-worshipping Maga cult that Varāhamihira was a part of. In his Brhat-samhita, Varāhamihira mentions that the Magas were the only people suitable for consecrating an image of the Sun god, just like Bhagavatas for Vishnu, the ash-bearing Brahmanas (Pashupatas) for Shambhu, those well-versed in the mandala-krama worship for the mother goddess, the Brahmanas for Brahman, the Shakyas for the Buddha, and the Digambaras (nagnas) for Jina. The Magas, as they came to be known in India, originated from the Magi priests of the Achaemenid Empire. Historian Ajay Mitra Shastri cites a Bhavishya Purana passage according to which the term "Magadha" is a synonym of "Maga" and refers to "those who contemplate on the Maga". According to Shastri, Utpala has used the word "Magadha" to denote the Magas, who had been accepted as Shaka-dvipi (Maga) Brahmins in the Indian society. Shastri theorizes that "Varaha-mihira" may be a Sanskritized form of the Iranian name "Varaza-Mihr", and may refer to a legend mentioned in the Mihr Yasht of the Avesta. According to this legend, the god Verethraghna, in the form of a boar (varaza), precedes Mihr in his march. Shastri notes that the 5th century Sassanian monarch Bahram V bore the name Mihrvaraza, which is quite similar to Varahamihra. Academic J.E. Sanjana suggests that Varāhamihira was descended from an Iranian Magi priest. Some scholars, such as M.T. Patwardhan and A.N. Upadhye, have identified Varāhamihira with Bazurjmehr, mentioned in Firishta's writings as a minister of the Sasanian king Khusraw Nushirwan (r. 531-578). However, A.M. Shastri dismisses this theory as unconvincing. There are several historically inaccurate legends about the ancestry of Varāhamihira: Jain writers Merutunga (14th century) and Rajashekhara-Suri claim that his original name was Varaha, and he was a brother of the Jain patriarch Bhadrabahu. He gained knowledge because of a favour by the Sun, because of which the suffix "Mihira" ("Sun") was added to his name. Jain authors seem to have fabricated