Vishvamitra (विश्वामित्र, ) is one of the most venerated rishis or sages of ancient India. He is one of the seven Brahmarshi. According to Hindu tradition, he is stated to have written most of the Mandala 3 of the Rigveda, including the Gayatri Mantra (3.62.10). The Puranas mention that only 24 rishis since antiquity have understood the whole meaning of —and thus wielded the whole power of — the Gayatri Mantra. Vishvamitra is supposed to have been the first, and Yajnavalkya the last.
Before renouncing his kingdom and royal status, Brahmarishi Vishvamitra was a king, and thus he retained the title of Rajarshi, or 'royal sage'.
Historically, Viśvāmitra Gāthina was a Rigvedic rishi who was the chief author of Mandala 3 of the Rigveda. Viśvāmitra was taught by Jamadagni Bhārgava. He was the purohita of the Bharata tribal king Sudās, until he was replaced by Vasiṣṭha. He aided the Bharatas in crossing the Vipāśa and Śutudrī rivers (modern Beas and Sutlej). In later Hindu texts, Viśvāmitra and Vasiṣṭha have a long-standing feud, and scholars have stated they historically had a feud regarding the position of the Bharata purohita. However, this view has been criticized due to lack of internal evidence and the projection of later views onto the Rigveda. In post-Rigvedic literature Viśvāmitra becomes a mythical sage.
Most of the stories related to Vishvamitra's life is narrated in the Valmiki Ramayana. Vishvamitra was a king in ancient India, also called Kaushika (descendant of Kusha) and belonged to Amavasu Dynasty. Vishvamitra was originally the King of Kanyakubja (modern day Kannauj). He was a valiant warrior and the great-grandson of a great king named Kusha. Valmiki Ramayana, prose 51 of Bala Kanda, starts with the story of Vishvamitra:
There was a king named Kusha (not to be confused with Kusha, son of Rama), a mindson (manasputra) of Brahma and Kusha's son was the powerful and verily righteous Kushanabha. One who is highly renowned by the name Gaadhi was the son of Kushanabha and Gaadhi's son is this great-saint of great resplendence, Vishvamitra.