Two U.S. warships have sailed through the Taiwan Strait in an apparent show of support for the government of the self-ruled island, which China claims as its own.

Taiwan's defense ministry said in a statement the ships passed through from south to north on Wednesday without incident, adding they were free to sail in the Taiwan Strait.

China, which last month complained about a French ship's passage through the strait, said it had expressed concerns to the U.S. side.

"According to information learnt from the relevant department, China followed closely the passage of the U.S. warships through the Taiwan Strait, and we are fully aware of the whole process," ministry spokesman Lu Kang said at a news conference.

"We urge the U.S. to ... properly deal with Taiwan-related issues with caution so as to avoid further negative impacts to China-U.S. relations and peace and stability in the Taiwan Strait," Lu said.

China maintains a more ambiguous sea boundary than defined by international treaty and has asserted a claim to virtually the entire South China Sea, which is contiguous with the Taiwan Strait and where several governments have competing claims.

In a statement, spokesman for the U.S. 7th Fleet Joseph Keiley said the Arleigh Burke-class destroyer USS Preble and the oiler USNS Walter S. Diehl conducted "a routine Taiwan Strait transit on Tuesday-Wednesday in accordance with international law."

"The ships' transit through the Taiwan Strait demonstrates the U.S. commitment to a free and open Indo-Pacific. The U.S. Navy will continue to fly, sail and operate anywhere international law allows," Keiley said.

Also on Wednesday, Taiwan's navy held a major live-fire exercise off the island's east coast in an area increasingly threatened by Chinese ships and planes.

Navy craft fired cannons and missiles and released depth charges, while fighter jets launched munitions and anti-submarine warfare aircraft released buoys.

Submarines, along with a vast array of ballistic missiles, are considered among China's most potent weapons against Taiwan, which split from the mainland during a civil war in 1949.

China has boosted its military threat against Taiwan, with President Xi Jinping saying this year that Beijing would not rule out using force.

That comes on top of growing Chinese pressure to isolate Taiwan internationally and inflict economic pain to force independence-leaning President Tsai Ing-wen to agree to Beijing's contention that Taiwan is a part of China.