U.S. Secretary of State John Kerry talks with China's President Xi Jinping before a meeting at the Great Hall of the People in Beijing. (Jim Bourg/Reuters)

The United States and China ended two days of talks Thursday, sparring over cyber-espionage and Asian maritime tensions but insisting that they are still actively cooperating on a broad range of other issues.

Washington and Beijing have been trading complaints about cyberspying after accusations that Chinese military hackers were stealing trade secrets from American companies and Edward Snowden’s revelations of extensive U.S. spying on foreign governments.

“The loss of intellectual property through cyber means has a very chilling effect on innovation and investment,” Secretary of State John F. Kerry said at a news conference at the end of the sixth annual Strategic and Economic Dialogue in Beijing. “I emphasized that incidents of cybertheft have harmed our businesses and threatened our nation’s competitiveness.”

In May, the Justice Department charged five members of the Chinese military with cyber-espionage against U.S. firms. Beijing responded by calling off talks on cybersecurity. While the United States has been appealing for that dialogue to resume, China put the ball squarely back in Washington’s court Thursday.

“Cyberspace should not become a tool for damaging the interests of other countries,” Yang Jiechi, China’s top diplomat, said. “China hopes the U.S. will create the conditions for the two sides to have a dialogue and cooperate on cyber issues.”

Secretary of State John Kerry played his guitar at the urging of China's vice premier. (State Department)

There also was no sign of progress in calming tensions in the East and South China seas, where China’s assertive staking of territorial claims has spooked other nations that also lay claim to hundreds of islands, rocks, sandbanks and reefs scattered across the potentially oil- and gas-rich waters.

The United States has been bolstering security ties with allies Japan and the Philippines, as well as with other nations in the region, but insists that it is not trying to contain China.

Beijing appeared unconvinced. “We urged the United States to adopt an objective and fair stance and to honor its commitment to not taking sides,” Yang said.

Kerry said the United States had no position on any side’s territorial claims but opposed “unilateral action meant to enforce a particular assertion of sovereignty.”

Although he also expressed concern about China’s “recent detention and arrest of journalists, lawyers and activists,” Kerry maintained that there were many areas of common interests and cooperation, including climate change, counterterrorism and wildlife trafficking. He also said there is room to work together on efforts to check Iran’s nuclear ambitions and persuade North Korea to give up its nuclear weapons program.

The United States and China, which together account for nearly half of the world’s greenhouse gas emissions, also kicked off joint projects to promote the capture and storage of carbon, boost energy-efficient “smart” electricity grids and reduce emissions from industrial boilers.

Although they remain far apart on goals for capping overall emission levels, Kerry said the new cooperation on climate change was a marked shift from two years ago, when he was in the U.S. Senate, and added that it raised hope for greater action in the future.

“It is our hope that this will actually be given greater meat on the bones than it has today, but at this point in time, this is an improbable act that is being played out, and we hope it ultimately will be well received and will be fruitful,” he said.

Treasury Secretary Jack Lew, who was part of the U.S. delegation, said China had agreed to limit its interventions in the foreign-exchange market “as conditions permit,” marking a step toward establishing a market-determined exchange rate for its currency, the yuan.

Washington has long accused Beijing of keeping the yuan’s value artificially low, boosting Chinese exports at the expense of U.S. jobs.

Lew also said China had agreed to open up its service sector, including financial services, to greater foreign investment, but he gave no details. Gregory Gilligan, chairman of the American Chamber of Commerce in China, said in a statement that U.S. companies welcomed the announcement but that “more needs to be done to reduce the restrictions on foreign companies that continue to impede innovation and deprive consumers of choice.”

U.S. companies complain that there are significant barriers to investment in China and that the playing field is increasingly tipped against them and in favor of domestic firms, especially those owned by the state.

Overall, Kerry said the two sides had shown significant levels of cooperation on major issues and a capacity to manage their differences while recognizing the need “to avoid falling into the trap of a zero-sum competition.”

More poetically, Chinese Vice Premier Wang Yang said the two sides had ensured that “the giant ship of U.S.-China relations will continue to brave the winds and the waves and continue on the right course.”

Liu Liu contributed to this report.