The U.S. has flown two B-1B bombers over the South China Sea, the air force said Friday, part of operations intended to demonstrate Washington's commitment to freedom of navigation in the contested waters and airspace.

China, which claims almost all of the strategic waterway, slammed the move, with Foreign Ministry spokesman Geng Shuang maintaining that freedom of navigation or overflight in the East and South China seas was not a problem.

"But China resolutely opposes individual countries using the banner of freedom of navigation and overflight to flaunt military force and harm China's sovereignty and security," he said.