 Thanjavur was successfully conquered in 1674 by Ekoji I ( 1675 – 84 ) , the Maratha feudatory of the sultan of Bijapur and half @-@ brother of Shivaji ( 1627 / 30 @-@ 80 ) of the Bhonsle dynasty . Ekoji founded the Thanjavur Maratha kingdom which ruled Thanjavur till 1855 . The Marathas exercised their sovereignty over Thanjavur throughout the last quarter of the 17th and the whole of the 18th century . The Maratha rulers patronized Carnatic music . In 1787 , Amar Singh , the regent of Thanjavur , deposed the minor Raja , his nephew Serfoji II ( 1787 – 93 ) and captured the throne . Serfoji II was restored in 1799 with the assistance of the British , who induced him to relinquish the administration of the kingdom and left him in charge of Thanjavur fort and surrounding areas . The kingdom was eventually absorbed into British India in 1855 by the Doctrine of Lapse when Shivaji II ( 1832 – 55 ) , the last Thanjavur Maratha ruler , died without a legitimate male heir . The British referred to the city as Tanjore in their records . Five years after its annexation , the British replaced Negapatam ( modern @-@ day Nagapattinam ) with Thanjavur as the seat of the district administration . Under the British , Thanjavur emerged as an important regional centre . The 1871 India census recorded a population of 52 @,@ 171 , making Thanjavur the third largest city in the Madras Presidency . After India 's independence , Thanjavur continued as the district headquarters . 
