The British fought their way to Kandy, encountering Kandyan resistance led in part by a Malay commander known as Sangunglo. Upon their arrival they found the city deserted. Rather than torching it, they installed a puppet king, Muttusami, and left a small garrison in the town before withdrawing. The Kandyans recaptured the city, leaving only one survivor, and harried British forces down to the Mahaveli river, but were routed at Hanwella. The following year another British incursion resulted in stalemate, and an uneasy truce was in place by 1805.