Around 650 CE, the former empire in India was replaced by smaller kingdoms, and patronage of Buddhism retreated to certain areas where a few large monasteries stayed active.
The Sthaviravada school (Theravada) was the main form of Buddhism in southern India, but eventually remained only in Sri Lanka.
The arrival of Muslim invaders in India resulted in the destruction of the remaining monasteries, which largely brought Buddhism in India to an end by the end of the 12th century CE.