SANTIAGO, Chile (AP) — Chilean President Sebastián Piñera said Wednesday he is canceling two major international summits so he can focus on his response nearly two weeks of nationwide protests over economic inequality that have left 20 dead, hundreds injured and damaged businesses and infrastructure around the country.

The decision is a major blow to Chile’s image as a regional oasis of stability and economic development.

WATCH: From Lebanon to Chile, economic uncertainty is driving a wave of protests

U.S. and Chinese negotiators were hoping to finalize a modest trade agreement in time for President Donald Trump and Chinese President Xi Jinping to sign it at the Asia-Pacific Economic Cooperation summit in Santiago, set for Nov. 16-17. Under the tentative deal, the U.S. had agreed to suspend plans to raise tariffs on $250 billion in Chinese imports, and Beijing had agreed to step up purchases of U.S. farm products.

Piñera also said Chile wouldn’t host the global U.N. global climate gathering planned for Dec. 2-13 “thanks to the difficult circumstances that the country has seen in recent weeks.”

Chile has seen 13 days of massive protests to demand greater economic equality and better public services in a country long seen as an economic success story. The demonstrations have been accompanied by some vandalism and arson, which forced the shutdown of numerous subway stations.

“This has been a very difficult decision that causes us great pain,” Piñera said in a televised address.

But he added, “A president always has to put the needs of his compatriots first.”

U.N. Climate Change Executive Secretary Patricia Espinosa issued a statement saying that “alternative hosting options” were being explored. And a U.N. official, speaking on condition of anonymity for lack of authorization to comment publicly, said that all U.N. venues are being considered as options. Those would include cities such as New York, Geneva, Bonn, Vienna and Nairobi.

The Santiago conference was meant to work out some of the remaining unresolved rules for countries on climate efforts, smoothing the way for the bigger effort in the 2020 summit: encouraging countries to up their commitments to cutting climate-changing emissions.

Even if cancelling the Santiago climate conference means those rules don’t get written this year, “the absence of rules does not stop countries from acting either alone or together” to cut emissions, said Nigel Purvis, a climate and environment negotiator in the Clinton and George W. Bush administrations. “It really shouldn’t slow down climate action.”

Associated Press writer Ellen Knickmeyer and Paul Wiseman in Washington and Frank Jordans in Berlin contributed to this story.