Liz Truss has used her first overseas speech since resigning as British prime minister to call on the west to safeguard Taiwan’s security and economy in the face of Chinese aggression “before it is too late”. Speaking in Tokyo at a meeting of mainly conservative lawmakers that included the former Australian prime minister Scott Morrison, Truss said Britain had been naive to court the Chinese president, Xi Jinping, in 2015, adding that Russia’s invasion of Ukraine should serve as a warning of what happens when democracies fail to stand up to authoritarian regimes. Truss told a meeting organised by the Inter-Parliamentary Alliance on China that the G7 and other democracies should urgently agree a package of coordinated defence, economic and political measures in support of Taiwan. “Our governments must signal to [China] that military aggression towards Taiwan would be a strategic mistake,” said Truss, who is Britain’s shortest-serving prime minister, having spent just 45 days in office when she resigned last October. “When it comes to China, a failure to act now could cost us dearly in the long run.” Her keynote speech is being seen as an attempt to rebuild her political reputation, but also to add to pressure on her successor, Rishi Sunak, to take a stronger stance against Beijing. More hawkish Conservative MPs have called on Sunak to reclassify China as a “threat” instead of a “systemic competitor” in an update to the government’s defence and foreign policy strategy, which is expected to be published next month. In November Sunak declared an end to the “golden age” of UK-China relations but called for continued engagement with Beijing based on “robust pragmatism” – a departure from the more hawkish stance Truss adopted during her leadership campaign last summer. Declaring herself a “huge admirer” of Chinese culture and civilisation, Truss said on Friday: “Nobody would love to see a prosperous, democratic, freedom-loving China more than me – of course I would.” But she added: “Some people say standing up to this regime is a hopeless task. That somehow the rise of a totalitarian China is inevitable. But I reject this fatalism. And the free world has a significant role to play in whether or not that happens – and how it happens.” Xi drew widespread condemnation last summer after Chinese forces held large-scale military drills near Taiwan, soon after the then US speaker, Nancy Pelosi, visited the self-governing island. Beijing regards Taiwan as a renegade province and has vowed to reunite it with the motherland. “We know that President Xi has been very clear – it’s his ambition for China to have control of Taiwan and in my view that would be disastrous,” Truss said. “The message needs to be heard loud and clear in Beijing that these incursions are not acceptable.” She called for a more developed Pacific defence alliance and deeper economic integration with Taiwan to prevent conflict, saying Britain’s attempts to court Xi in 2015 were a mistake. “We rolled out the red carpet for the Chinese president – with all the pomp and ceremony that came with a state visit,” she said. “I should know – I attended a banquet in his honour. Looking back, I think this sent the wrong message.” Russia’s invasion of Ukraine was a “stark reminder” of how authoritarian regimes are emboldened when countries fail to act early against acts of aggression, she said. Morrison, who had earlier likened the west’s “appeasement” of China to the Munich agreement with Hitler, asked Truss during a panel session why the energy crisis in Europe triggered by the war in Ukraine had not made countries think twice about deepening their engagement with China on trade given the global economic fallout that would result from a conflict in the Taiwan strait, one of the world’s busiest shipping routes. “People don’t want to believe the worst will happen,” Truss said. “That is part of what we are seeing with China.”