Although the Japanese army had defeated the Chinese regular and Formosan militia forces with little difficulty, a number of locally raised guerrilla bands maintained an insurgency against the Japanese for the next seven years. The insurgency initially flourished because the bulk of the invasion force was repatriated after the surrender of Tainan, so that for several months there were relatively few Japanese troops left on the ground in Taiwan. The Japanese responded to the continuing resistance with a carefully calibrated 'stick and carrot' policy, granting clemency to insurgents who laid down their arms while hunting down and annihilating those that did not, and taking brutal reprisals against villages believed to be sheltering guerrillas.