In the 17th century the Dutch and British made it a center of their cotton purchases in Gujarat, and commercial warehouses were established in 1616 and 1618 by the British and Dutch (Valanda) respectively. After that, in 1675 and 1686, it was sacked by the Marathas. During this time period, Bharuch was handed over to Kutubuddin. Mughal king Aurangzeb demolished the fortification and the fort in 1660 by attacking. Later on, he had built it again in 1686. In 1772, the British again attacked Bharuch, defeating Nawab Mu‘azzaz Khan, allegedly with the help of his minister, Diwan Lallubhai. The British handed over Bharuch to the Marathas who ruled between 1783–1802. From 1802, Bharuch was returned to the East India Company under the terms of the Treaty of Salbai.