The Step Brother of Chatrapathi Shivaji called Venkoji alias Ekoji was born to the second wife of Shahaji in Bangalore and he was working under the Sultan of Bijapur during 1676 A.D. When there was a war between the Madurai Alagiri and Thanjavur Vijayaraghava Nayak the latter was killed in the war and the Minister Rayasam Venkanna took Sengamala Dass, the grandson of Vijayaraghava to the Sultan of Bijapur Adil Shah to ask help to drew Alagiri. Therefore, Bijapur Sultan sent Venkoji alias Ekoji , the valiant General to lead Bijapur army to Thanjavur. Venkoji conquered Alagiri, but Chengamala Dass was weak and unable to rule the country. He himself flew away and the Minister Venkanna asked Venkoji to take the throne. Since then, the Marathas ruled Thanjavur for about 180 years upto 1855 A.D.
Twelve Kings ruled the country, out of them Shahaji II was famous for his contribution to music, dance and drama. He was a valiant ruler and during his tenure, the country expanded up to Ramanathapuram. Then, King Pratap Singh alias Pratap Simha fought against Chanda Sahib with the help of French in Pudhucherry and saved the Thanjavur. Serfoji II was the last but one who preserved the Sarasvati Mahal Library from the British and spent lot of money for its maintenance. The Sarasvati Mahal is named after him, because he himself collected lot of manuscripts, paintings and printed books from the British Officers. He travelled to Kasi, Benares and Orissa during 1819 and 1821. He himself contributed so many literatures, dramas and dictionary works. It is said that King Serfoji II of Tanjavur had used a Kuravanji drama to teach geography.