BEIJING -- The United States and China sparred Wednesday on how to deal with North Korea's latest nuclear weapons test and ease rising tensions over territorial disputes in the South China Sea.

After meeting for more than four hours in Beijing in what they both termed "constructive" and "candid" discussions, U.S. Secretary of State John Kerry and Chinese Foreign Minister Wang Yi nonetheless presented sharply opposing positions on the two issues at a news conference.

Kerry acknowledged that "our differences will continue to test us" but stressed that when the United States and China are able to work together, including on the Iran nuclear deal and climate change, the world benefits.

On North Korea, Kerry said the United States wanted new U.N. Security Council action that would impose "significant new measures" to punish Pyongyang for its latest test earlier this month and boost pressure on it to return to disarmament talks.

Get Breaking News Delivered to Your Inbox

Wang said China agreed on the need for a new resolution, but suggested that Beijing would not support new sanctions. "Sanctions are not an end in themselves," he said.

"The new resolution should not provoke new tension in the situation, still less destabilize the Korean peninsula," Wang said.

Kerry noted that sanctions had brought Iran to the nuclear negotiating table. "With all due respect," he said. "More significant and impactful sanctions were put in place against Iran, which did not have a nuclear weapon than against North Korea, which does."

"All nations, particularly those who seek a global leadership role, or have a global leadership role, have a responsibility to deal with this threat," he said, referring to China.

For his part, Wang also took umbrage at U.S. complaints that China is not doing as much as it can with the leverage it has on North Korea to stop the destabilizing behavior. He noted that China's position has been consistent in opposing North Korea's nuclear weapons program and supporting a diplomatic resolution to the matter.

"For many years China has been working hard to implement these," he said. "We have delivered on our obligation."

Wang said China's position is "clear cut" and "responsible."

"We reject all groundless speculation or distortion of China's position," he said.

Kerry, though, pressed ahead, saying that China is North Korea's main link to the outside world, and that it could do more to limit cross-border transactions that benefit North Korean leader Kim Jong Un and his government.

Kim Jong Un's actions in testing the latest device was "reckless and dangerous," Kerry said, vowing that the U.S. would take whatever steps it needed to protect itself and its allies.

Kerry, who after meeting with Wang was set to see State Councilor Yang Jiechi and President Xi Jinping, also called on China to halt land reclamation and construction of airstrips in disputed areas of the South China Sea, steps that have alarmed its smaller neighbors.

Wang, though denied that China has was doing anything other than protecting its territorial sovereignty. And, he rejected accusations from the United States and others that China was not interested in peaceful resolutions to the disputes or militarizing the areas. "We cannot accept the allegation that China's words are not being matched by actions."

Kerry arrived in China from stops in Laos and Cambodia, where he called on the two members of the Association of Southeast Asian Nations to present a united front in dealing with increasing Chinese assertiveness over the South China Sea claims. His visits to Vientiane and Phnom Penh come ahead of a summit with the leaders of all 10 ASEAN nations that President Barack Obama will host next month in California.

China, which claims sovereignty of much of the territory in the South China Sea, rejects claims from countries like the Philippines and Vietnam and has bristled at U.S. warnings that its activities threaten the freedom of navigation in some of the world's busiest commercial shipping lanes. Taiwan, Malaysia and Brunei also have overlapping claims in the strategically vital sea, through which around $5 trillion in world trade passes each year.

The U.S. says it takes no position on the claims but says developments in the South China Sea are a national security interest. It has urged that the disputes be settled peacefully and that a binding code of conduct be established for the area.

Tensions have been especially high since Beijing transformed seven disputed reefs into islands, where it is now constructing runways and facilities that rival claimants say can be used militarily. China has said it built the islands primarily to foster safe civilian sea travel and fishing.

In response, the U.S. sent a guided-missile destroyer close to one of the Chinese-built islands, called Subi Reef, in October in a challenge to Beijing's territorial claims, sparking warnings from China. U.S. officials vowed to continue maneuvers to protect freedom of navigation and overflight.

Recent developments, including China's movement of an oil rig into a zone disputed with Vietnam and warnings against Philippines overflight of what it claims to be its territory, have raised those levels of concern. China dismisses the warnings as unwarranted, but has harshly criticized a U.S.-Philippines defense pact that allows American forces, warships and planes to be based temporarily in local military camps. China says that will "escalate tensions and undermine peace and stability in the region," echoing language the United States uses to criticize China's actions.