The Palas were followed by the Sena dynasty who brought Bengal under one ruler during the twelfth century. Vijay Sen the second ruler of this dynasty defeated the last Pala emperor Madanapala and established his reign. Ballal Sena introduced caste system in Bengal and made Nabadwip the capital. The fourth king of this dynasty Lakshman Sen expanded the empire beyond Bengal to Bihar, Assam, Orissa and probably to Varanasi. Lakshman was later defeated by the Muslims and fled to eastern Bengal were he ruled few more years. The Sena dynasty brought a revival of Hinduism and cultivated Sanskrit literature in India. It is believed by some Bengali authors that Jayadeva, the famous Sanskrit poet and author of Gita Govinda, was one of the Pancharatnas (meaning 5 gems) in the court of Lakshman Sen.