President Obama and Chinese President Xi Jinping arrive for a joint press conference in the Rose Garden. SAUL LOEB/AFP/Getty Images

The U.S. and China found common ground on cybersecurity on Friday, an agreement announced in remarks delivered jointly by Chinese President Xi Jinping and President Obama from the South Lawn of the White House.

“The United States welcomes the rise of a China that is peaceful, stable, prosperous, and a responsible player in global affairs, and I’m committed to expanding our cooperation even as we address disagreements candidly and constructively. That’s what President Xi and I have done on this visit,” Obama said.

“I raised once again our very serious concerns about growing cyberthreats to American companies and American citizens. I indicated that it has to stop,” Obama said. “The United States government does not engage in cyber economic espionage for commercial gain, and today I can announce that our two countries have reached a common understanding on the way forward. We have agreed that neither the U.S. nor the Chinese government will conduct or knowingly support cyber-enabled theft of intellectual property, including trade secrets or other confidential business information for commercial advantage.”

Obama added that the United States and China would work together with other countries worldwide to establish standards of “appropriate conduct in cyberspace.” Obama characterized the moves as “progress,” even as he noted there is more work to be done.

Presidents Xi and Obama also jointly announced the creation of a cap-and-trade program in China, a move designed to build momentum for a strong agreement to confront global warming when world leaders meet in Paris later this year for United Nations climate talks. It’s slated to launch in 2017.

China has long been seen as a laggard in tackling the threat of global warming, but the U.S. and China—two of the world’s largest contributors to the greenhouse gases driving global warming—now appear ready to use their outsized influence to confront climate change worldwide. The White House has been working hard to extract climate commitments from China. Last November, China and the U.S. agreed to a historic pledge to curb greenhouse-gas emissions driving dangerous global warming.

Obama mentioned China’s economic status during his remarks Friday. He said that even though parts of China still require development, it can no longer be treated “as if it’s still a very poor and developing country.” Rather, he said, it’s now a “powerhouse” that has “responsibilities.”

Asked by a Chinese reporter if China’s growth adversely affects America, Xi noted that the United States has “incomparable advantages and strengths.” But he said the world must move beyond viewing global economics as a “zero-sum game.” China’s development benefits the U.S. and the entire world, Xi said, as U.S. growth benefits China and other nations.  

The two presidents’ press conference comes just hours after news that House Speaker John Boehner will resign from his position effective Oct. 30. Obama said that the news took him by surprise and that he had called Boehner just before the press conference. The president praised the speaker as “a good man” and “a patriot.” Obama declined to “prejudge who the next speaker will be.” He said he hopes there is “a recognition on the part of the next speaker ... that we can have significant differences on issues but that doesn’t mean you shut down the government.”

Obama and Boehner aren’t exactly buds: The speaker defied the White House earlier this year when he arranged a visit from Israeli Prime Minister Benjamin Netanyahu to address a joint meeting of Congress. He’s also routinely clashed with the administration on Obamacare and budget concerns, including with lawsuits. But Boehner faced criticism from members of his own caucus for engaging in talks with the president as they tried to hammer out a “Grand Bargain” on the nation’s debt back in 2011.  

“When you have divided government, when you have a democracy, compromise is necessary,” Obama said Friday. “And I think Speaker Boehner sometimes had difficulty persuading members of his caucus [of] that.”

Speaking about the challenges that Boehner faced, Obama said: “You don’t get what you want 100 percent of the time. Sometimes you take half a loaf, sometimes you take a quarter loaf. That’s certainly something that I’ve learned here in this office.”

During Friday’s press conference, Obama noted that cybersecurity has been a matter of “serious discussion” between himself and Xi for more than two years, since their bilateral meeting at Sunnylands in California. Though he believes they’ve made “significant progress” in figuring out how U.S. and Chinese law enforcement will work together to fight cybercrime, “the question now is, are words followed by actions?” The president said his administration will be “watching carefully” to determine the answer to that query.

Obama said Xi told him he cannot “guarantee” the good behavior of all of his citizens, just as Obama can’t promise good behavior from all Americans.

“What I can guarantee, though, and what I’m hoping President Xi will show me,” Obama said, “is that we are not sponsoring these acts and that when it comes to our attention that nongovernmental entities or individuals are engaged in this stuff, that we take this seriously and we’re cooperating to enforce the law.”

Obama’s planned meetings with Xi have proved controversial since the state visit was announced months ago, and they’ve been a hot topic in the 2016 GOP field. Sen. Marco Rubio and Carly Fiorina have criticized the Obama administration for arranging a formal state dinner during Xi’s visit, planned for Friday night. Both think Xi’s trip should have been reframed as a working visit. Recent campaign dropout Scott Walker, on the other hand, advocated for the trip to be canceled in its entirety. The candidates have cited China’s role in cyberattacks on the United States, its currency manipulation, and its human-rights record as reasons to cancel or shift gears.

Obama didn’t ignore human-rights concerns during his remarks Friday afternoon. He shifted from announcing a partnership on global development with China—focusing on humanitarian assistance and global health, among other subjects—to that country’s human rights record. Obama said he “affirmed” American support for individual rights, free press, and the free movement of civil-society groups in China in talks with Xi, and “we expect that we’re going to continue to consult in these areas” in the future.

Xi addressed another elephant in the room: his country’s actions in the South China Sea. He asserted that the islands in the South China Sea are his nation’s “property” and he encouraged “countries directly involved” in disputes over territory to address their issues through mutual dialogue.

This story has been updated. 

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.