The U.S. State Department's number two diplomat on Friday compared China's behavior in pursuit of territory in the South China Sea to that of Russia in eastern Ukraine.

Deputy Secretary of State Antony Blinken called China's large scale reclamation projects in the South China Sea, "a threat to peace and stability."

He said the United States took no position on the merits of competing claims in the disputed sea, but had a strong interest in how those were pursued, and in preserving freedom of navigation.

"The way forward is for China, and all claimants, to freeze their reclamation activities and resolve their difference in accordance the rule of law," he said.

Hughes Reef, November 15, 2014. Asia Maritime Transparency Initiative "In both eastern Ukraine and the South China Sea, we’re witnessing efforts to unilaterally and coercively change the status quo — transgressions that the United States and our allies stand united against," Blinken said in a speech at the Center for a New American Security think tank.

China claims nearly all of the South China Sea and says it has every right to build up reefs there. Its top diplomat State Councilor Yang Jiechi said after talks with the United States this week that freedom of navigation in the Sea, through which $5 trillion in ship-borne trade passes every year, was guaranteed.

The comments come at a time of rising tensions between the United States and China over the latter's increasingly assertive behavior in Asia and massive cyber attacks on U.S. government computers.

A pro-Russian rebel aims his weapon as people pass by, during what the rebels said was an anti-terrorist drill in Donetsk, March 18, 2015. Reuters On Thursday, U.S. intelligence chief James Clapper said on China was the top suspect in the hacking attacks on the Office of Personnel Management, which compromised the data of millions of Americans.

It was the first time the Obama administration has publicly accused Beijing of the hacking, but Clapper said the attacks were still under investigation. Chinese Foreign Ministry spokesman Lu Kang called this "absurd logic."

In April last year, U.S. Assistant Secretary of State for East Asia Daniel Russel said the prospect of economic retaliation should discourage Beijing from using force to pursue territorial claims in Asia in the way Russia had in Crimea. He also said China should not doubt the U.S. commitment to defend its Asian allies.

(Story refiles to remove extraneous word "and" from last paragraph)

(Reporting by David Brunnstrom; Editing by Chizu Nomiyama)