After conquering the Sultanate of Bijapur, the Mughals under the commandership of Khasim Khan, then arrived in Bengaluru, which was then ruled by Shivaji's brother Veankoji/ Ekoji Bhonsale as a jagir (fief) of Bijapur in 1686; Vyankoji retreated further south.
The Mughals in turn sold Bengaluru to the Kingdom of Mysore's ruler Chikkadevaraja Wodeyar in 1689 for three lakhs which he had originally negotiated with Venkoji / Ekoji Bhonsle.