The Marathas played a major role in the decline of Mughal power. Under the dynamic leadership of Shivaji, they posed a strong challenge to Mughal power during the 1670s. By the middle of the 18th century, they had succeeded in displacing Mughal power in central India. Nayak rule ended in 1674 in Thanjavur, when the Maratha General Venkoji (half brother of Shivaji) leading the Bijapur forces invaded Thanjavur and succeeded in establishing Maratha rule in the Tamil region. Maratha rule in Thanjavur which started from 1674 continued until the death of Serfoji II in 1832.