By Idrees Ali

WASHINGTON (Reuters) - The U.S. military flew B-52 bombers in the vicinity of the South China Sea this week, U.S. officials told Reuters, a move that is likely to cause anger in Beijing amid heightened tensions between the two countries.

Lieutenant Colonel Dave Eastburn, a Pentagon spokesman, said that B-52 bombers transited over the South China Sea as part of "regularly scheduled operations designed to enhance our interoperability with our partners and allies in the region."

Such flights are common, but usually upset Beijing. In June, China's foreign ministry said no military ship or aircraft could scare China away from its resolve to protect its territory after U.S. B-52 bombers flew near disputed islands in the South China Sea.

The United States and China have frequently sparred about the militarization of the South China Sea, where China, Taiwan, Vietnam, Malaysia, Brunei and the Philippines all have competing claims.

"If that was 20 years ago and (China) had not militarized those features there, it would have just been another bomber on its way to Diego Garcia or whatever," U.S. Defense Secretary Jim Mattis told reporters.

Eastburn said separately the United States also flew B-52 bombers over the East China Sea on Tuesday as part of a "regularly scheduled, combined operation."

China recently denied a request for a U.S. warship to visit Hong Kong amid rising tension between Beijing and Washington.

China summoned the U.S. ambassador in Beijing and postponed joint military talks in protest against a U.S. decision to sanction a Chinese military agency and its director for buying Russian fighter jets and a surface-to-air missile system.

Mattis said he did not think there was a fundamental shift in relations between China and the United States.

"We certainly maintain the military-to-military relationship and the level of participation and collaboration may go up and down at times, but there is a strategic relationship there that I think both sides recognize the need for," Mattis said.

Story continues

The United States and China are embroiled in a trade war, sparked by U.S. President Donald Trump's accusations that China has long sought to steal U.S. intellectual property, limit access to its own market and unfairly subsidize state-owned companies.

Trump accused China of seeking to meddle in the Nov. 6 U.S. congressional elections on Wednesday, saying Beijing did not want his Republican Party to do well because of his pugnacious stance on trade.

(Reporting by Idrees Ali; Editing by Alistair Bell)