The first known settlers in Taiwan were Austronesian tribal people, who are thought to have come from modern day southern China.
The island seems to have first appeared in Chinese records in AD239, when an emperor sent an expeditionary force to explore the area - a fact Beijing uses to back its territorial claim.
After a relatively brief spell as a Dutch colony (1624-1661), Taiwan was administered by China's Qing dynasty from 1683 to 1895.
From the 17th Century, significant numbers of migrants started arriving from China, often fleeing turmoil or hardship. Most were Hoklo Chinese from Fujian (Fukien) province or Hakka Chinese, largely from Guangdong. Their descendants are now by far the largest demographic groups on the island.
In 1895, Japan won the First Sino-Japanese War, and the Qing government had to cede Taiwan to Japan. After World War Two, Japan surrendered and relinquished control of territory it had taken from China. The Republic of China (ROC) - one of the victors in the war - began ruling Taiwan with the consent of its allies, the US and UK.
But in the next few years a civil war broke out in China, and the then-leader Chiang Kai-shek's troops were defeated by Mao Zedong's Communist army.
Chiang, the remnants of his Kuomintang (KMT) government and their supporters - about 1.5m people - fled to Taiwan in 1949.
This group, referred to as Mainland Chinese, dominated Taiwan's politics for many years though they only account for 14% of the population. Chiang established a government in exile in Taiwan which he led for the next 25 years.
Chiang's son, Chiang Ching-kuo, allowed more democratisation after coming to power. He faced resistance from local people resentful of authoritarian rule and was under pressure from a growing democracy movement.
President Lee Teng-hui, known as Taiwan's "father of democracy", led constitutional changes towards, which eventually made way for the election of the island's first non-KMT president, Chen Shui-bian, in 2000.
แทงบอลเต็ง