Taiwan has been hailed as a textbook example of a successful transition to democracy. At the end of the civil war in 1949, Chiang Kai-shek, leader of the Kuomintang (KMT), lost to Mao Zedong's communist forces and fled to the island. After almost four decades of martial law until 1987, Taiwan eventually held its first presidential election in 1996.