Senior U.S. and Chinese officials concluded four days of meetings on Saturday on cyber security and other issues, ahead of Chinese President Xi Jinping's visit to Washington later this month, the White House said.
Cyber security has been a divisive issue between Washington and Beijing, with the United States accusing Chinese hackers of attacks on U.S. computers, a charge China denies.
U.S. national security adviser Susan Rice had a "frank and open exchange about cyber issues" in her meeting this week with Meng Jianzhu, secretary of the Central Political and Legal Affairs Commission of the Chinese Communist Party, the White House said in a statement.
The Chinese delegation also had meetings with Federal Bureau of Investigation Director James Comey and representatives from the Justice, State and Treasury departments and the intelligence community, the statement said.
China's official Xinhua news agency said that Meng, who is the country's domestic security chief, had reached "important consensus" with the U.S. during his visit.
Both countries agree it is "vital" they cooperate on fighting hacking, Meng said, adding that China will punish anyone who hacks from within China's borders or steals corporate secrets.
"China's position on opposing hacking and stealing commercial secrets online is resolute," Xinhua cited Meng as saying.
President Barack Obama said last month he would raise concerns about China's cyber security behavior when he meets with Xi in Washington.
The Obama administration is considering targeted sanctions against Chinese individuals and companies for cyber attacks against U.S. commercial targets, several U.S. officials have said.
Chinese hackers have also been implicated in the massive hacking of the U.S. government's personnel office disclosed this year. Two breaches of security clearance applications exposed the personal data of more than 20 million federal employees.