Chile has canceled a pair of major global summits on the economy and environment in the coming weeks amid unrest in Santiago, scrambling President Donald Trump’s hopes of signing a first-step trade deal with China at one of the events.

President Sebastián Piñera announced the cancellation as his administration struggles to suppress growing demonstrations in the capital, Santiago, over issues of inequality in one of South America’s wealthiest nations. As many as 1 million protesters took part in a peaceful march over the weekend, while smaller protests have turned violent, prompting the government to declare a state of emergency in several major cities.

Trump was scheduled to attend the Asia Pacific Economic Cooperation forum in Santiago from Nov. 15 to 17. White House officials said he was planning to meet with China’s President Xi Jinping in a bid to lock in details of a “phase one” trade pact that could ease tensions between the economic powers and lay the groundwork for a bigger trade deal next year.

Chilean officials also pulled out of playing host to the Conference of the Parties, or COP, a major climate change summit, at which more than 100 international delegations were expected.

“A president must always put his compatriots above all else,” Piñera said. “Our main concern is reestablishing public order, our citizens’ safety and social peace along with pushing through a social agenda to respond to the main demands of our citizens.”

White House spokesman Hogan Gidley said APEC does not have a backup site for the summit and that the Trump administration is waiting to learn whether it will take place elsewhere. He emphasized that the United States is still trying to finalize the trade agreement with Beijing in the “same time frame.”

Trump said Oct. 11 that U.S. and Chinese negotiators had “agreed in principle” on a “substantial phase one” pact, the first step toward the comprehensive arrangement that the U.S. president has promised amid an extended trade war with Beijing.

As part of the agreement, Trump agreed not to proceed with plans this month to raise tariffs on $250 billion in Chinese imports to 30 percent from 25 percent in return for China promising to buy billions of dollars in additional products from U.S. farmers.

Negotiators have been meeting since then to produce a written agreement, which Trump hoped to sign in Chile. But there is no real deadline for those talks, and with the Santiago summit off the calendar, it is not clear when the phase-one deal will be finalized.

Trump had expressed optimism about the talks Monday. “We are looking probably to be ahead of schedule to sign a very big portion of the China deal, we’ll call it Phase One, but it’s a very big portion,” he told reporters.

Analysts have said that the deal is unlikely to address most of the structural concerns that U.S. officials have raised over China’s economic model, including intellectual property theft. Both sides have also left in place sweeping tariffs on a range of products that have disrupted global supply chains and sent tremors through economic markets, depressing growth, according to analysts.

The Trump administration is scheduled to impose another round of 15 percent tariffs on an additional $160 billion of Chinese imports in mid-December.

Trump had not planned to attend the environmental summit in Chile, though a U.S. delegation was expected.

The White House also announced Wednesday that Commerce Secretary Wilbur Ross would lead the U.S. delegation to the East Asia Summit and the Association of Southeast Asian Nations gathering in Bangkok next week. Trump has not attended those events since 2017.

Leaders from around the world had planned to gather in Chile for the COP to push to ramp up efforts to sharply cut carbon emissions in coming years and to meet the goals of the landmark Paris climate accord, which was signed in 2015.

Teen climate activist Greta Thunberg had planned to speak at the conference, once again chiding world leaders to act with more urgency. Trump is also expected to give official notice soon that the United States plans to withdraw from the Paris accord next year, and delegates to the summit would have been forced to wrestle with that move.

Now, questions remain about how many nations will be prepared to meaningfully increase their pledges to take more aggressive climate action ahead of 2020 – the date when the Paris agreement said countries must make a new round of promises.

In a statement Wednesday, Patricia Espinosa, executive secretary for the U.N. Framework Convention on Climate Change, said she was informed of Chile’s decision to not host the conference “in view of the difficult situation that the country is undergoing.”

“We are currently exploring alternative hosting options,” Espinosa said.

Helen Mountford, vice president for climate and economics at the World Resources Institute, said in a statement that the group’s members “fully understand and respect the government’s decision” to suspend the climate summit under the circumstances.

Still, she said, “It is more critical than ever that countries continue to make progress in tackling climate change and address important issues for implementation of the Paris Agreement.”

– – –

The Washington Post’s Karen DeYoung and David J. Lynch contributed to this report.