China has threatened war with Taiwan if Taipei declares independence even as it diplomats warn the United States against treating Beijing as a strategic rival as military tensions rise in the Taiwan Strait.

The twin  blasts were delivered Thursday by the Chinese military and a key Chinese diplomat, and likely meant to dampen any moves by the incoming Biden administration to support an independent Taiwan.

China calls Taiwan a renegade province that must reunite with the mainland under a political formula, or by military force if necessary. The U.S. recognizes Beijing as the sole government of China in a 1972 diplomatic agreement, while continuing military and commercial ties with Taiwan.

China's Ministry of National Defense on Thursday in Beijing said recent sorties by its warplanes into Taiwanese airspace this month were acts of self-defense against provocations by Taiwan and the U.S. The U.S. has sailed warships through the strait in December, part of what are deemed freedom of navigation exercise that also occur at another potential U.S.-China flashpoint, the South China Sea. 

Defense Ministry spokesman Wu Qian said China's sorties were "necessary actions" while calling Taiwan an inseparable part of China.

"The military activities carried out by the Chinese People's Liberation Army in the Taiwan Strait are necessary actions to address the current security situation in the Taiwan Strait and to safeguard national sovereignty and security," said Wu.

"We warn those 'Taiwan independence' elements: those who play with fire will burn themselves, and 'Taiwan independence' means war," he said.

Separately, Cui Tiankai, China's ambassador to the U.S., said there could be "mistakes" if the Biden administration clings to a Trump administration's view that China is a "strategic rival."

"Treating China as a strategic rival and imaginary enemy would be a huge strategic misjudgment," said Cui in a forum in Beijing on Thursday. "To develop any policy on the basis of that would only lead to grave strategic mistakes."

Cui said China would not yield on matters concerning sovereignty and territorial integrity in clear references to Taiwan. "China will not back down. We hope the United States will respect China's core interest and refrain from crossing the red line," warned Cui.

On the other hand, Cui said China wants cooperation, not confrontation with the U.S. He called for both countries to address differences through dialogue but again warned the U.S. against it crossing China's "red lines."