Chhattrapati Shahu, a grandson of Shivaji, was released by the Mughals after the death of Emperor Aurangzeb. Following a brief struggle with his aunt Tarabai, Shahu became ruler and appointed Balaji Vishwanath, and later, his descendants, as the peshwas or prime ministers of the empire.