China lashed out at Taiwan after the island's prime minister said it would defend itself by firing missiles at Shanghai in the event of an attack by China.

Officials at China's Taiwan Affairs Office say the comments by Taiwan Prime Minister Yu Shyi-kun show that the island's leaders do not want peace.

Mr. Yu last week said Taiwan had the ability to strike China's financial hub, Shanghai, with missiles if the mainland attacks the island.

On Wednesday, Li Weiyi, a spokesman for China's Taiwan Affairs Office said the comments show that Taiwan's leaders are trying to create tension across the Taiwan Strait.

"This kind of war-provoking action thoroughly exposes the Taiwan authorities attempt to seek independence through arms and its nature of faking peace while truly seeking independence," he said.

China has hundreds of missiles pointed at Taiwan, and is adding more. Civil war split the two sides in 1949, and since then, China has threatened to take back Taiwan by force if it makes moves toward formal independence.

Taiwan plans to purchase $18 billion of U.S. weapons it says will maintain a balance of power with China.

Beijing has asked Washington to cancel the deal and accuses Taiwan of carrying out "splittist activities" that threaten peace.

Although the United States recognizes that Taiwan is part of China, it has warned both sides to avoid any unilateral action that would change the status quo.

Thousands of protesters demonstrated against Taiwan's plan to buy U.S. anti-missile systems, planes and submarines in Taipei a few days ago. The demonstrators say the deal would spark a wasteful arms race.

At the United Nations earlier this week, Chinese Foreign Minister Li Zhaoxing warned world leaders to refrain from any action that would encourage Taiwan to pursue independence.