China's President Xi Jinping warned on Wednesday that the unification of China and Taiwan was "inevitable", with the use of military force remaining an option.

Xi made the comments during a speech marking the 40th anniversary of a message sent to Taiwan, when China declared an end to what had been routine artillery bombardment of Taiwan-controlled offshore islands and offered to open up communication between the two sides.

The "Message to Compatriots in Taiwan" in 1979 eventually led to a thaw in relations with the self-ruled island.

Here are key dates in relations between Taipei and Beijing.

1949: Separation

Mao Zedong's communists take power in Beijing in October 1949 after defeating Chiang Kai-shek's Kuomintang (KMT) nationalists in a civil war.

The KMT flee to the island of Taiwan and form their own government in Taipei in December, cutting off contacts with mainland China.

In 1950, Taiwan becomes an ally of the United States, which is at war with Communist China in Korea. It deploys a fleet in the Taiwan Strait between the two to protect its ally from possible attack from the mainland.

1971: Beijing gets UN nod

In October 1971, Beijing takes over China's seat at the United Nations, previously held by Taipei.

In 1979, the US establishes diplomatic relations with China but also commits to assisting the defence of Taiwan. It backs the policy of "one China", with Beijing as the legitimate government, but establishes trade and military ties with Taipei.

1987-2016: fragile reconciliation

In late 1987, Taiwan residents are for the first time permitted to visit China, allowing families to reunite and leading to a boom in trade.

In 1991, Taiwan lifts emergency rule, unilaterally ending a state of war with China. The first direct talks between the two sides are held in Singapore two years later.

But in 1995, Beijing suspends talks in protest at a visit by Taiwanese President Lee Teng-hui to the US.

In 1996, China tests missiles off Taiwan to deter voters in the island's first democratic presidential election.

In 2000 elections, the KMT loses power in Taiwan for the first time and over the next five years trade links between the two sides improve, first by sea and then via air.

In March 2005, Beijing adopts a law which makes secession by Taiwan illegal at the risk of military action. In April, there is the first meeting since 1949 of the leaders of the KMT and Communist Party of China.

In 2008, Taiwan and China resume high-level talks after the KMT's Ma Ying-jeou is elected president on a Beijing-friendly platform.

In 2010, they sign a sweeping Economic Cooperation Framework Agreement; in 2014, they hold the first government-to-government talks since separation.

In 2015, the leaders of both sides meet in Singapore, shaking hands and waving enthusiastically to a huge press throng but refraining from any joint statement.

2016: End of the honeymoon

In January 2016, opposition candidate Tsai Ing-wen, from the traditionally pro-independence Democratic Progressive Party, wins elections to become Taiwan's first female president.

In her victory speech, Tsai said the results showed that democracy is ingrained in the Taiwanese people and that she will strive to maintain stability with China.

"We will work towards maintaining the status quo for peace and stability across the Taiwan Strait in order to bring the greatest benefits and well-being to the Taiwanese people," Tsai said.

The day of her inauguration in May, China cautions that peace would be "impossible" if she makes any moves to formally break away.

In June, China suspends all communications with Taiwan after the island's new government fails to acknowledge the concept that there is only "one China".

In December 2016, President-elect Donald Trump breaks with decades of US diplomatic policy by speaking directly, by telephone, with Tsai.

In 2017, Trump's administration approves $1.4bn worth of arms sales to Taiwan, prompting anger from Beijing.

In March 2018, the US adopts a law reinforcing ties with Taiwan, again infuriating China.

In September 2018, the US State Department approves the sale to Taiwan of spare parts for F-16 fighter jets and other military aircraft worth up to $330m, drawing a warning from China that the move jeopardised cooperation between Beijing and Washington.