BEIJING/TAIPEI (Reuters) - Taiwan will fail to get foreign support for its cause, the Chinese government said on Wednesday after a Chinese diplomat threatened the self-ruled island with attack, while Taiwan said it was committed to peace.

China considers Taiwan to be a wayward province and has never renounced the use of force to bring it under its control. The United States has no formal ties with Taiwan but is bound by law to help it defend itself and is its main source of arms.

Beijing regularly calls Taiwan the most sensitive and important issue between it and the United States. In September, the U.S. Congress passed the National Defense Authorization Act for the 2018 fiscal year, which authorizes mutual visits by navy vessels between Taiwan and the United States.

That prompted a senior U.S.-based Chinese diplomat to say last week that China would attack Taiwan the instant any U.S. navy vessel visited the island.

Asked about the remarks at a regular news briefing in Beijing, An Fengshan, spokesman for China’s policy-making Taiwan Affairs Office, said Taiwan was an internal matter and China opposed any form of military contacts between Taipei and Washington.

“What I want to stress and point out is that any relying on foreigners to build oneself up or plots to harm national sovereignty and territorial integrity will be opposed by the entire Chinese nation, and cannot succeed,” An said.

China suspects Taiwan President Tsai Ing-wen, who leads the independence-leaning Democratic Progressive Party, wants to declare the island’s formal independence. Tsai says she wants to maintain peace with China but will defend Taiwan’s security.

The Chinese air force has this year carried out a series of drills near Taiwan, prompting Taiwan to scramble jets to shadow the mainland aircraft.

Speaking at a security forum in Taipei, Taiwan Vice President Chen Chien-jen said China had been sending more naval vessels and aircraft through the East China Sea, in addition to its “provocative behaviors” in the South China Sea, where Taiwan is also party to a festering territorial dispute.

“Nevertheless, we remain committed to maintaining the status quo of peace and stability in the Taiwan Strait, but this requires cooperation from both sides,” Chen said.

“We are looking for positive dialogue between the two sides of the Taiwan Strait, and hope it will happen soon. That would benefit the people on both sides, our region and our world.”

Since Tsai took office, China has suspended a regular dialogue mechanism with Taiwan and has been slowly siphoning off its remaining diplomatic allies.