WASHINGTON (Reuters) - U.S. Navy warships twice sailed near islands claimed by China in the South China Sea in the past few days, the U.S. military told Reuters on Thursday, at a time of heightened tension between the world’s two largest economies.

FILE PHOTO: An aerial photo taken though a glass window of a Philippine military plane shows the alleged on-going land reclamation by China on mischief reef in the Spratly Islands in the South China Sea, west of Palawan, Philippines, May 11, 2015. REUTERS/Ritchie B. Tongo/Pool

The busy waterway is one of a number of flashpoints in the U.S.-China relationship, which include a trade war, U.S. sanctions, Hong Kong and Taiwan.

Earlier this week during high-level talks, China called on the U.S. military to stop flexing its muscles in the South China Sea and adding “new uncertainties” over democratic Taiwan, which is claimed by China as a wayward province.

The U.S. Navy regularly angers China by conducting what it calls “freedom of navigation” operations by ships close to some of the islands China occupies, asserting freedom of access to international waterways.

The littoral combat ship Gabrielle Giffords traveled within 12 nautical miles of Mischief Reef on Wednesday, Commander Reann Mommsen, a spokeswoman for the U.S. Navy’s Seventh Fleet, told Reuters.

The destroyer Wayne E. Meyer challenged restrictions on innocent passage in the Paracel islands on Thursday, Mommsen said.

“These missions are based in the rule of law and demonstrate our commitment to upholding the rights, freedoms, and lawful uses of the sea and airspace guaranteed to all nations,” she said.

China’s military confirmed on Friday that the two U.S. warships had sailed through the contentious waterways and said it tracked the passage of the American ships.

“We urge (the United States) to stop these provocative actions to avoid any unforeseeable accidents,” the spokesman for China’s Southern Theatre Command said in a statement. “China has indisputable sovereignty over the South China Sea islands and its surrounding area.”

China claims almost all the energy-rich waters of the South China Sea, where it has established military outposts on artificial islands. However, Brunei, Malaysia, the Philippines, Taiwan and Vietnam also have claims to parts of the sea.

China’s Foreign Ministry also voiced anger, saying it had lodged strong representations with the U.S. over the warships movements.

“The U.S. actions severely damage China’s sovereignty and safety, destroy the peace and stability in the South China Sea, and we express our resolute opposition,” said ministry spokesman Geng Shuang at a daily press briefing on Friday.

The United States accuses China of militarizing the South China Sea and trying to intimidate Asian neighbors who might want to exploit its extensive oil and gas reserves.

U.S. Defense Secretary Mark Esper met Chinese Defense Minister Wei Fenghe earlier this week for closed-door talks on the sidelines of a gathering of defense ministers in Bangkok.

Wei urged Esper to “stop flexing muscles in the South China Sea and to not provoke and escalate tensions in the South China Sea”, a Chinese spokesman said.

Esper has accused Beijing of “increasingly resorting to coercion and intimidation to advance its strategic objectives” in the region.