The half Brother of Chatrapathi Shivaji maharajah named King Venkoji alias Maharajah Ekoji was born to the second wife of King 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 Raje, the valiant General to lead Bijapur army to Thanjavur. Venkoji Raje conquered Alagiri, but Chengamala Dass was weak and unable to rule the country. He himself flew away and the Minister Venkanna asked Venkoji Raje to take the throne. Since then, the Marathas ruled Thanjavur for above 175 years upto 1855 A.D.
Twelve Kings ruled the country, out of them King Shahaji II was famous for his contribution to music, dance and drama. He was a valiant ruler and during his tenure, the country expanded upto Ramanathapuram. Then, King Pratap Singh alias Pratap Simha fought against Chanda Sahib with the help of French in Pudhucherry and saved the Thanjavur. King 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 Thanjavur had used a Kuravanji drama to teach geography.