WASHINGTON — Ukraine’s stiff resistance against the invasion by Russian forces could be a model for Taiwan to defend itself should China choose to violate the island’s “sovereignty” by attacking, a senior US defense official told a Senate hearing on Thursday.

The United States, like most countries, does not have formal ties with Taiwan but is its main arms supplier, and has long urged it to buy cost-effective and mobile defense systems — so-called “asymmetric” weapons — to counter China’s more powerful military.

“I think the situation we’re seeing in Ukraine right now is a very worthwhile case study for them about why Taiwan needs to do all it can to build asymmetric capabilities, to get its population ready, so that it can be as prickly as possible should China choose to violate its sovereignty,” said Mara Karlin, assistant secretary of defense for strategy, plans and capabilities.

Under the United States’ “one China” policy, Washington only acknowledges China’s stance that the island belongs to it, but takes no position on Taiwan’s sovereignty.

China bristles at any reference to democratically self-governed Taiwan as independent, and Beijing’s ambassador to Washington warned in January that US encouragement of independence could trigger a military conflict between the two superpowers.

Asked about Ms. Karlin’s remark to the Senate Foreign Relations Committee, a spokesman for China’s embassy in Washington, Liu Pengyu, said some in the United States have abetted forces for Taiwan independence in a bid to hold back China’s rejuvenation.

“This would not only push Taiwan into a precarious situation, but also bring unbearable consequences for the US side,” Mr. Liu said in an e-mail.

Jessica Lewis, assistant secretary of state for political-military affairs, told senators that the United States continues to urge Taiwan to procure asymmetric systems, which had been “used to great effect in Ukraine.”

Taiwan needs to prioritize short-range air defense, naval sea mines and coastal defense and cruise missiles, Ms. Lewis said, adding that the United States and Taiwan were increasingly seeing eye-to-eye on what qualified as an asymmetric system.

“We’re working with them on that today. I think we have a much deeper understanding of that right now,” Ms. Lewis said.

Ms. Lewis said Taiwan also needed to take a cue on reserve force reforms from Ukraine, which has volunteer territorial defense units and around 900,000 reservists, and that its population “has to be ready to fight.”

“Obviously we don’t want there to be a conflict in Taiwan,” Ms. Lewis said. Taiwan has just created “an all-out defense mobilization organization” and is working with the US National Guard in the development stage, Ms. Lewis said. — Michael Martina/Reuters