Ekoji otherwise called Venkoji (1676–83), half-brother of Chatrapati Shivaji marched into Thanjavur on behalf of the Adil Shah of Bijapur under whom he was a General. He subsequently captured Thanjavur and established the Maratha rule. Despite intermittent wars, when Thanjavur was overrun first by the Nawab of Arcot and later by Haidar Ali, Ekoji and his successors like Tulajaji, Serfoji II (Sarabhoji in Tamil) and others remained great patrons of the arts and artists. By the time Serfoji II succeeded to the Maratha throne in Thanjavur, the Britishers had taken over the complete administration of the state, retaining the king in only a nominal capacity to exercise power over the fort and a smidgen of surrounding lands . Though Serfoji II had to fight off a spirited competition from Amarasimha, his paternal uncle, to the Maratha throne of Thanjavur, it was during his reign that Thanjavur painting flourished and reached the form and style in which we recognise it today. Serfoji II had to traverse a difficult path throughout his reign, being constantly challenged by Amarasimha who ran a parallel court in Thiruvidaimarudur even after his accession. However, despite the troubled times, Serfoji's reign was a time of great innovations in Thanjavur art and many other parallel fields. The Maratha rule came to a sad end after the death of its last ruler Shivaji II, (resembling only in name his vastly greater ancestor) who died without a male issue, when the Britishers obliged by annexing the Thanjavur state to its dominions under the notorious Doctrine of Lapse. After the Maratha rule waned, the mercantile Chettiar community continued to patronise the Thanjavur artists. The Chettiars being staunch Shaivites encouraged Shaivite themes. One of their monasteries in Koviloor has large Thanjavur paintings on the lives of the 63 Nayanmars (Saivaite saints) and the 64 miracles (Thiruvilaiyadal Puranam) of Lord Shiva minutely labelled in Tamil. Similarly, the Bhimarajagoswami monastery in Thanjavur has a large painting of 108 Vishnu temples. The Britishers who had come into Thanjavur in the wake of the Anglo-Mysore wars also patronised Thanjavur artists and their paintings. Style and technique Thanjavur paintings were made in various sizes depending upon the function, the subject and the choice of the patron. Large paintings of deities and the Maratha rulers, their courtiers and nobility, were painted and installed to serve as architectural accents in the Maratha palaces and buildings. To quote Dallapiccola –