Viharas primarily served as residences for Buddhist monks and have existed since the time of the Buddha. Initially, they were made of bamboo and reed, built as simple shelters in natural parks donated by wealthy followers for the Buddha to rest and preach during the four-month rainy season.
After the Buddha’s passing, viharas gradually became more permanent structures. By the Ashokan period, they were commonly built using bricks or carved into rock and were found across most parts of India.
A typical Buddhist vihara featured a series of individual cells surrounding a central courtyard, which functioned as a space for communal gatherings. These cells provided monks with secure spaces for meditation.