The language of the Vedas had become obsolete, cultivated only by the priests before Panini. A new form of it had come into existence, by the incorporation of dialectal elements which had already crept into the language.
This was Sanskrit, described by Panini as bhasha which, though a artificial vehicle of expression, became the polished language of intercourse and instruction in the brahmanical institutions.
This development, however, did not interfere with the evolution of the dialects which are grouped under the name Middle Indo-Aryan. This had different stages of evolution. The earliest commenced before the Mauryas and continued upto AD 200. It is represented in the inscriptions of Maurya and Kushana periods, early Buddhist and Jaina canonical works and the dilects used in Saripatra Prakarana of Asvaghosha and the plays of Bhasa.
These dialects had by this time attained normalised forms suitable for literary purposes. The second stage commenced from about the third century AD and is represented by the literary Prakrits used in the plays by the grammarians of the later times. These Prakrits were: Magadhi, Sauraseni, Maharashtri, Avanti and Paisachi, the first three being the most important.
The early Buddhist texts were written in Magadhi whereas the early Jaina texts were written in Ardha- Magadhi. In the post-Ashokan period, Pali came to be used as an important literary language (Ceylonese tradition identify it with Magadhi).
Later on, when the centre of Jainism shifted to the west, the language came to be regarded, as a form of Maharashtri. In some Buddhist texts such as the Mahavastu and the Lalitavistara, mixed Sanskrit is used. The Brihatkatha of Gunadhya has been written in a dialect called Paisachi.
Classical Sanskrit was also establishing itself slowly in some regions. Katyayana (Mauryan) and Patanjali (Shunga) tried to maintain the high standard set by Panini. The impact of the Middle- Indo-Aryan led to the simplification of the grammar and the vocabulary by the inclusion of dialectal words in Sanskritized forms. Words were also borrowed from the non-Aryan languages – Austric and Dravidian. Sanskrit began to be used as the medium of a new literature from the beginning of the Christian era.
Asvaghosa was probably the first to use Sanskrit for the composition of plays and a new type of epic, which strictly belongs to what is known as classical Sanskrit literature. Sarvastivada and Mula-Sarvastivada schools of Buddhist philosophy adopted it and wrote their canonical literature in it.
From the middle of the second century AD the Sakas of western India became great patrons of this language. They were the first to introduce Sanskrit in inscriptions. The rulers of this dynasty used titles like svamin, bhadramukha, sugrihitanaman and rastriya for the first time.
Since these titles are not found in earlier literature, it is possible that it was under the patronage of these foreign rulers that Sanskrit drama originated and the classical Sanskrit shaped for fine literary works.
These foreign adventurers were also responsible for propagating Sanskrit in foreign lands. The Sakas were the first Sanskritic colonists in Indo-China and Indonesia where Sanskrit was adopted in the initial charters.
The Buddhist scholars and monks carried Sanskrit to eastern Turkestan (Khotan, Kucha etc.). Thus, during the first three centuries of the Christian era classical Sanskrit firmly established itself in India and also in new lands of the Far-East and Central Asia.