When the cracks had started to develop in the edifice of the Mughal empire in the mid-17th century, the Marathas were consolidating their power in the west, Chatrapati Shivaji, the great Maratha ruler, attacked Muslim merchants in Surat twice first in 1664 and again in 1672.
The Peshwas had established their sovereignty over Gujarat including Saurashtra, and collected taxes and tributes through their representatives.