Liz Truss has urged democratic nations to stand up to China and learn the lessons of not taking earlier and tougher action against Russia.
Speaking in Japan in her first public speech since her resignation as prime minister, Ms Truss called on the international community to agree a co-ordinated package of defence, economic and political measures to support Taiwan.
Her comments come as her successor, Prime Minister Rishi Sunak, faces pressures from some in his own party to take a firmer line on China.
Ms Truss was addressing a conference in Tokyo, organised by the Inter-Parliamentary Alliance on China (Ipac), an international campaign group seeking to co-ordinate the response of democratic nations to Beijing.
She also said Taiwan’s international status needs to "reflect its global value" and suggested its people should be able to "speak for themselves" in international organisations such as the World Health Organisation.
Ms Truss said that in hindsight heralding a "golden era" of UK-China relations and rolling out the red carpet "sent the wrong message".
She added that the rise of "totalitarian China" is not inevitable, but the "free world has a significant role to play".
She spoke of the level of global GDP represented by the G7, saying: "We need to use that leverage to ensure the G7, plus its allies, act as an economic Nato… and there are ways this can be done.
"We can move to an economic Article 5, where the 'one for all, all for one' principle is wielded in defence of our values."
On Taiwan’s status on the world stage, she said: "We need to find ways to elevate Taiwan's status to reflect its global value. Taiwan is still excluded from many international organisations, such as the World Health Organisation."
She said that damages the world's access to information, which was "very unhelpful" during the Covid pandemic.
"Righting this wrong wouldn't just be in our interests. It would help ensure that the people of Taiwan are able to speak for themselves, rather than being spoken for," she added.
Ms Truss said the international community has "ignored far too many of the warning sings" of China's actions, citing examples in Xinjiang and Hong Kong.
She told the gathering: "We need to learn the lessons of the past if we are to ensure a safer and freer future.
"Putin's appalling war in Ukraine serves as a stark reminder of why we need to stand up to the threats of authoritarian regimes early.
"Our response to the Russian invasion of Ukraine has been good and effective since the war started. But I regret that we in the West weren't tougher earlier in response to aggressive and hostile actions from Moscow.
"So when it comes to China, a failure to act now could cost us dearly in the long run. Our governments must signal to the PRC (People’s Republic of China) that military aggression towards Taiwan would be a strategic mistake.
"The international community should agree a package of co-ordinated defence, economic and political measures to support Taiwan now."
Taiwan has its own democratically elected government, but the island is also claimed by the mainland Chinese Communist Party government.
The country is not formally recognised as a sovereign state by the UK, which has called for the dispute to be resolved peacefully, but the UK does support Taiwan’s participation in international organisations as an observer.
There has been growing international concern over escalating tensions, with China recently holding large-scale military exercises seen by some as preparation for a blockade or invasion of Taiwan.