text: Viharas as monasteries The early history of viharas is unclear. Monasteries in the form of caves are dated to centuries before the start of the common era, for Ajivikas, Buddhists and Jainas. The rock-cut architecture found in cave viharas from the 2nd-century BCE have roots in the Maurya Empire period. In and around the Bihar state of India are a group of residential cave monuments all dated to be from pre-common era, reflecting the Maurya architecture. Some of these have Brahmi script inscription which confirms their antiquity, but the inscriptions were likely added to pre-existing caves. The oldest layer of Buddhist and Jain texts mention legends of the Buddha, the Jain Tirthankaras or sramana monks living in caves. If these records derived from an oral tradition accurately reflect the significance of monks and caves in the times of the Buddha and the Mahavira, then cave residence tradition dates back to at least the 5th century BCE. According to Allchin and Erdosy, the legend of First Buddhist Council is dated to a period just after the death of the Buddha. It mentions monks gathering at a cave near Rajgiri, and this dates it in pre-Mauryan times. However, the square courtyard with cells architecture of vihara, state Allchin and Erdosy, is dated to the Mauryan period. The earlier monastic residences of Ajivikas, Buddhists, Hindus, and Jains were likely outside rock cliffs and made of temporary materials and these have not survived.