In December 1779 Hartley was sent with a small detachment to act under Colonel Thomas Goddard to Guzerat.
On 24 May he defeated and dispersed a party of Mahrattas who had besieged the fortified post of Kallian to the northeast of Bombay.