WASHINGTON--President Barack Obama announced on Friday that he had reached a "common understanding" with Chinese President Xi Jinping on curbing economic cyber espionage, but threatened to impose U.S. sanctions on Chinese hackers who persist with cyber crimes. The two leaders also unveiled a deal to build on a landmark emissions agreement struck last year, outlining new steps they will take to deliver on pledges they made then to slash their greenhouse gas emissions. Speaking after White House talks during Xi's first U.S. state visit, Obama quickly homed in on the thorniest dispute between the world's two biggest economies - growing U.S. complaints about Chinese hacking of government and corporate databases, and the suspicion in Washington that Beijing is sometimes behind it. "It has to stop," Obama told reporters at a joint news conference in the White House Rose Garden, with Xi standing beside him. Obama said he and Xi made "significant progress" on cyber security. But he added warily: "The question now is, are words followed by actions?" There were clear limits to Friday's deal. A White House statement said the two leaders agreed that neither government would knowingly support cyber theft of corporate secrets or business information. But the agreement stopped short of any promise to refrain from traditional government-to-government cyber spying for intelligence purposes. That could include the massive hack of the federal government's personnel office this year that compromised the data of more than 20 million people. U.S. officials have traced that back to China, but have not said whether they believe the government was responsible. Xi reiterated China's denial of any government role in the hacking of U.S. corporate secrets and said the best way to address the problem was through bilateral cooperation and not to "politicize this issue." "Confrontation and friction are not the right choice for both sides," he said. China has routinely insisted that it too is a victim of cyber hacking. The White House said the two leaders agreed to create a senior expert group to further discuss cyber issues, and a high-level group to talk about how to fight cyber crime that will meet by the end of 2015 and twice a year after that. Obama made clear, however, that sanctions remained on the table. "We will apply those and whatever other tools we have in our tool kit to go after cyber criminals," he said. Despite the lingering friction, analysts said the agreement was a significant advance. James Lewis, senior fellow at the Center for Strategic and International Studies, said the White House had done better than he had expected. He said a combination of factors, including better U.S. tracking of cyber attacks and a leaked plan for sanctions, helped push the Chinese toward agreement, but added that Beijing also got Washington to consider some Chinese concepts for norms of behaviour and won U.S. support for its pursuit of corruption suspects. Even as the White House rolled out the red carpet for Xi, there were tensions not only over cyber security but a litany of other issues, including Beijing's economic policies, territorial disputes with its neighbours and its human rights record. Obama greeted Xi on arrival at the White House on Friday morning for an elaborate ceremony on the South Lawn, including a military honour guard and 21-gun salute. The two men struck a serious, businesslike tone when they appeared later before reporters, showing little sign of close personal rapport. U.S. and Chinese officials sought to cast their talks in a favorable light by showcasing at least one area of cooperation - the global fight against climate change. As part of their agreement, Xi announced that China, the world's biggest emitter of greenhouse gases, will launch a national carbon cap-and-trade system in 2017 to help contain the country's emissions. Such systems put limits on carbon emissions and open up markets for companies to buy and sell the right to produce emissions. For Obama, the deal with China strengthens his hand ahead of a global summit on climate change in Paris in December. But disagreements on other issues still loomed. Obama told Xi at the morning welcoming ceremony that the United States would continue to speak out over its differences with China, but he reiterated that the United States welcomes the rise of a China that is "stable, prosperous and peaceful." Xi, who faces a rising nationalism at home as well as pressure to get China's economic house in order, called for "mutual respect." As the two leaders spoke, dozens of pro- and anti-Xi protesters gathered near the White House grounds, waving flags, beating drums and shouting slogans. In their talks, Obama also pressed Xi to follow through on economic reforms and not discriminate against U.S. companies operating in China. Some analysts believe Obama has more leverage due to China's slowing economic growth, which has destabilized global markets. At the same time, the Obama administration is still at a loss about how to curb China's assertiveness in the South China Sea, where Beijing has continued to reclaim land for potential military use despite conflicting claims with its neighbours. Obama said he had "candid" discussions with Xi on disputes in the Asia-Pacific region. Xi defended his government's "right to uphold our own territorial sovereignty" and denied any plan to use its island-building efforts to create military strongholds. In a reminder of potential flashpoints, the United State and China also finalized a plan aimed at reducing the risk of aerial collisions between warplanes in areas such as the South China Sea through adoption of common rules of behaviour. Calls for Obama to take a harder line with China have echoed from Congress to the 2016 Republican presidential campaign. But his approach was tempered because the U.S. and Chinese economies are so closely bound together. On Friday night, Obama was to host a lavish black-tie state dinner where guests will dine on Maine lobster and Colorado lamb. Despite the ceremonial honours, the Chinese Communist leader, who came to Washington on the heels of Pope Francis, received nothing like the wall-to-wall U.S. news coverage given the popular pontiff, who drew adoring crowds wherever he went.