China warned the United States on Tuesday that it would respond militarily if House Speaker Nancy Pelosi visited Taiwan, which is conducting major military exercises in anticipation of a possible Chinese army invasion.

China considers Taiwan part of its territory and rejects its independence drive.

Chinese Defense Ministry spokesman Tan Kefe said that China has expressed its opposition to Pelosi's visit to Taiwan several times, and is looking forward to Washington's commitment not to support Taiwan independence.

Keefe added that the Chinese military is determined to protect the country and its territorial sovereignty against any foreign interference and any plans for Taiwan independence.

"If Pelosi visits Taiwan, the Chinese army will not stand idly by," the Chinese spokesman stressed.

He considered that the upcoming visit to Taiwan seriously violates the one-China principle and the three provisions of the joint communiques between China and the United States.

He added that if the visit takes place, it will cause great damage to the military relations between China and the United States and will aggravate the situation in the Taiwan Strait.

In turn, the Chinese Foreign Ministry said that Taiwan's path to independence is blocked.

Taiwanese warships rehearse against a possible Chinese invasion (Reuters)

Military exercises

In contrast, Taiwan Tuesday simulated the process of responding to Chinese naval attacks during the largest annual military exercises attended by President Tsai Ing-wen aboard a destroyer.

Taiwan lives under constant threat of being invaded by China, which considers the island part of its territory and vows to take it back by force if necessary.

On the second day of Taiwan's largest war games, Tsai, dressed in military fatigues, boarded a Ki-Long-class destroyer to supervise a live-fire exercise off Taiwan's east coast.

The military reported that planes and warships launched various types of missiles aimed at intercepting "a group of enemy ships."

Anti-submarine missiles and deep-bombs were also fired, while a Dutch-built Sword Dragon class submarine made an emergency ascent.

"The meticulous and solid training done by everyone shows the military's determination to protect our homeland and defend our country," Tsai said.

Last week, CIA chief William Burns said Beijing appears intent on using force in Taiwan while Russia's experience in Ukraine influences its calculations about when and how.