Qing Emperor Qianlong renamed the town
嘉义 ('commendable righteousness') in 1787 to honor its residents' loyalty during the Lin Shuangwen rebellion — one of the few Chinese city names literally given as a reward. In Taiwanese Hokkien pronunciation it's Ka-gī, which gave the romanization 'Chiayi.'