Alagiri Nayak was the younger brother of the Madurai Nayak king Chokkanatha Nayak and the last Nayak king of Thanjavur. In 1675, Thanjavur was conquered by Ekoji I, the half-brother of Shivaji who founded the Thanjavur Maratha kingdom.