BEIJING/SHANGHAI (Reuters) - International criticism of China over the disputed South China Sea will rebound like a coiled spring, a Chinese diplomat said on Friday, as a U.S. warship visited Shanghai against a backdrop of rising tension in the region.

Slideshow ( 2 images )

China claims almost all of the energy-rich South China Sea, through which more than $5 trillion of trade passes each year. The Philippines, Brunei, Vietnam, Malaysia and Taiwan have overlapping claims.

China’s increasingly assertive moves in the waters, including building artificial islands and air strips, have rattled nerves, with the Group of Seven (G7) advanced economies warning last month they opposed provocation there.

Ouyang Yujing, director-general of Chinese Foreign Ministry’s Department of Boundary and Ocean Affairs, said China took note of the criticism.

“Of course we’re willing to take on board constructive comments and criticism by the relevant countries,” Ouyang told a news briefing.

“But if they are aimed at putting pressure on China or blackening its name, then you can view it like a spring, which has an applied force and a counterforce. The more the pressure, the greater the reaction.”

China has been stepping up its rhetoric ahead of a ruling by the Permanent Court of Arbitration in The Hague on a case the Philippines has brought against China’s claims in the sea.

U.S. officials have expressed concern the ruling, expected soon, could prompt China to declare an air defense identification zone, as it did over the East China Sea in 2013. China has neither confirmed nor denied it could do that.

The ruling is expected to favor the Philippines and risks raising tension because China rejects the court’s authority to hear the case, even though it is a signatory of the U.N. Convention on the Law of the Sea under which it is being heard.

China has been particularly angered by what it sees as interference by the United States, whose military has carried out “freedom of navigation” patrols through the sea.

Last Friday, the U.S. Defense Department said China had denied a request for the 7th Fleet’s aircraft carrier strike group, to visit Hong Kong.

Still, China has allowed the 7th Fleet’s command ship, the USS Blue Ridge, to visit Shanghai, where on Friday, Joseph Aucoin, commander of the U.S. 7th Fleet, declined to speculate on the reason for the cancellation of the Hong Kong visit.

“I’m not going to let that get in the way of fostering better relations with the country and especially with their navy,” he told reporters at Shanghai’s dock.