Nalanda was a renowned Buddhist monastery and university in ancient Magadha, India. Located near the city of Rajagriha and about 90 kilometres southeast of Pataliputra, it operated from about 427 to 1197 CE. Nalanda was established during the Gupta Empire era, and was supported by numerous Indian and a few Javanese patrons – both Buddhists and non-Buddhists. Over some 750 years, its faculty included some of the most revered scholars of Mahayana Buddhism. Nalanda mahavihara taught six major Buddhist schools and philosophies such as Yogacara and Sarvastivada, the Hindu Vedas and its six philosophies, as well as subjects such as grammar, medicine, logic and mathematics. The university was also a major source of the 657 Sanskrit texts carried by pilgrim Xuanzang and the 400 Sanskrit texts carried by Yijing to China in the 7th-century, which influenced East Asian Buddhism. It was sacked and destroyed by the troops of Muhammad bin Bakhtiyar Khalji, partly restored thereafter, and continued to exist till about 1400 CE. Today, it is a UNESCO World Heritage Site.