Taiwan's former president Lee Teng-hui, who defied China and earned the nickname "Mr Democracy" for the part he played in the island's transition away from authoritarian rule, died Thursday aged 97.

He was credited with paving the way for Taiwan to become a modern, free society after decades of one-party dictatorship and became a champion of the island's bid to be treated as a sovereign state internationally.

Lee had been in hospital since February after choking on some food and had a history in recent years of chronic illnesses.

"He died of septic shock and multiple organ failure today despite the medical team's all out efforts to revive him," Taipei Veterans General Hospital vice president Hwang Shinn-jang told reporters.

Lee's 12 years in office from 1988 to 2000 were marked by growing cross-strait tensions as he pitched himself against Beijing, infuriating Chinese authorities for daring to carve out a separate identity for Taiwan.

Despite being self-ruled since 1949, Taiwan has never formally declared independence from the mainland and Beijing has vowed to react with force if it ever does.

China still regards Taiwan as part of its territory.

Lee was born in Taiwan in 1923 and educated in Japan, which ruled the island as a colony for 50 years until 1945, when it lost the Pacific War.

Taiwan was then handed back to China, which was under the rule of Nationalist Kuomintang (KMT) leader Chiang Kai-shek.

After Chiang lost a civil war to communist forces on the mainland four years later, he fled to Taiwan to set up a rival government.

Ruling with an iron fist, Chiang instigated a "White Terror" purge of opponents which lasted until his death in 1975.

Lee, a professor of agricultural economics, was introduced to Chiang's son Chiang Ching-kuo in the 1970s and gained his trust.

When he became president after his father's death, the younger Chiang promoted Lee to various top government positions.

By 1984 Lee was vice president and four years later was appointed leader following the younger Chiang's death, becoming the island's first Taiwan-born president.

Lee Teng-hui pictured in 2015
Lee Teng-hui pictured in 2015 AFP / Toshifumi KITAMURA

Martial law had already been lifted by the younger Chiang in 1987 but it was Lee who drove forward Taiwan's largely peaceful transition into a fully functional democracy.

His government introduced wide-ranging political reforms, including the election of a new parliament and a direct vote for president.

Lee then won Taiwan's first ever public leadership elections in 1996, which he took by a landslide despite threats from mainland China.

China fired ballistic missiles into the Taiwan Strait in an unsuccessful bid to stop voters choosing Lee, prompting the US to send warships to the area.

Once in office, Lee urged local firms to avoid extensive investments in China, promoting Taiwan's statehood and separate cultural identity from the mainland, which in turn branded him a "sinner" and "splittist".

Lee was succeeded by Chen Shui-bian of the Democratic Progressive Party (DPP) in 2000 when the KMT lost for the first time.

Lee's commitment to formally declaring an independent Taiwan only became clear after he stepped down and helped set up the Taiwan Solidarity Union which advocates a split from China, a move that prompted the KMT to expel him from the party.

After Ma Ying-jeou of the KMT succeeded Chen in 2008 and oversaw a rapprochement with China, Lee became a vocal critic of the government's Beijing-friendly policies.

He was indicted on corruption charges in 2011 for allegedly embezzling state funds while in office but was acquitted and accused the Ma government of "inventing" offences to persecute him.

Since 2016, Taiwan has been run by president Tsai Ing-wen who is also loathed by Beijing because she views the island as a sovereign state.

Beijing has ramped up economic, military and diplomatic pressure in response but Tsai won a landslide poll victory for a second term earlier this year.

In a statement Tsai described Lee as "irreplaceable, and his passing is a tremendous loss to our country".

China's nationalistic state-run Global Times newspaper meanwhile labelled Lee the "godfather of Taiwan secessionism".

"Lee's death is definitely not sad news to most people in the Chinese mainland," the tabloid wrote.

US Secretary of State Mike Pompeo offered condolences, saying Washington would celebrate Lee by "continuing to strengthen our bond with Taiwan and its vibrant democracy".