LIMA, Peru -- President Barack Obama on Saturday emphasized opportunities to create jobs as he met with leaders of countries that joined the U.S. to negotiate a sweeping Pacific trade deal that is now in jeopardy.

Speaking on the margins of the Asia-Pacific Economic Cooperation summit in Peru, Obama said the meeting was a good chance for leaders to review how to bring jobs and prosperity to their countries. They had hoped to achieve some of those goals through the Trans-Pacific Partnership, but the agreement appears unlikely to be ratified due to opposition by President-elect Donald Trump. Mr. Trump opposes multinational trade deals as written, saying they are harmful to U.S. workers.

“We’re going to have a busy agenda,” Obama said of the summit, “but this is always a useful occasion for us to get together and examine how we can make sure that we’re creating more jobs, more opportunity and greater prosperity for all of our countries.”

Obama did not mention the Pacific deal or Mr. Trump during the brief period that the news media were allowed into the meeting. The president supports trade deals as a way to boost U.S. exports and create American jobs.

Get Breaking News Delivered to Your Inbox

Mr. Trump, however, has slammed the North American Free Trade Agreement and promised to rework the treaty -- or leave it altogether if Canada and Mexico refuse to comply. Canadian officials have signaled an openness to renegotiating NAFTA with the U.S.

Mr. Trump’s protectionist stance was on the minds of other leaders attending the economic conference.

Chinese President Xi Jinping made an impassioned call against protectionism Saturday as Chinese state media blasted Mr. Trump for trade-bashing that could drag the world into “deeper economic distress.” Mexican President Enrique Pena Nieto defended his country’s trade relationship with the U.S., but took a cautious approach to Mr. Trump’s pledge to renegotiate NAFTA.

“In the face of Trump’s positioning, we’re now in a stage of favoring dialogue as a way to build a new agenda in our bilateral relationship,” said Pena Nieto, whose country participates in NAFTA with the U.S. and Canada. “Mexico, like the entire world, is about to initiate a new stage with the U.S. and in commercial terms we want to give the right value to this strategic relationship between Mexico and the U.S.”

The president-elect has yet to back down from his campaign trail rhetoric and earlier this week named Steve Bannon, a self-proclaimed “economic nationalist” and anti-globalist, as his chief White House strategist.

Since Obama opened the final foreign trip of his presidency in Greece on Tuesday, he has tried to reassure his counterparts that the U.S. will uphold its partnerships and obligations despite the divisive rhetoric of a campaign that ended with the election of a real estate mogul and reality TV star with no political or government experience.

Obama probably offered additional reassurance when he met earlier Saturday with Pedro Pablo Kuczynski, who took office as Peru’s president this year. The leaders made no public comments as they appeared before a contingent of U.S. and Peruvian news media.

On Friday, before Obama arrived in Peru’s oceanfront capital, Kuczynski warned that the U.S. presidential election is a sign of intensifying hostility toward free trade that threatens the global economy. He told delegates gathering for the Asia-Pacific Economic Cooperation Forum that global trade had stopped growing in the past two years, and would only worsen if nations wall off their economies.

“It is fundamental that world trade grow again and that protectionism be defeated,” said Kuczynski, who did not mention Mr. Trump by name.

Obama has argued for some time that globalization is here to stay and governments must address fears about what the changing economics mean for them.

Obama also met Saturday with Xi. Mr. Trump leveled harsh criticism at China during the election, threatening the Asian powerhouse with hefty import tariffs over alleged trade and currency violations.

Following their meeting, the president said he wanted to “take this opportunity to note our work together to build a more durable and productive set of bilateral ties.” The relationship between the two countries “is the most consequential in the world. I continue to believe that a constructive U.S.-China relationship benefits our two peoples and benefits the entire globe.”

Xi commended the president for his “active efforts” to grow that relationship. Since their last meeting in Hangzhou, the U.S.-China relationship has “generally speaking, continued to grow in a stable manner.”

“We meet at a hinge moment in the China-U.S. relationship,” Xi said. “I hope the two sides will work together to focus on cooperation, manage our differences, and make sure there is a smooth transition in the relationship and that it will continue to grow going forward.”

Obama also carved out time in between meetings for one of the staples of his overseas travels: a town hall-style forum with the region’s future leaders.

Obama’s message to young leaders at a town hall-style meeting in Lima was sanguine: “Don’t assume the worst.”

“I think it will be important for everybody around the world to not make immediate judgments, but give this new president-elect a chance to put their team together, to examine the issues, to determine what their policies will be,” Obama said. “How you campaign is not always how you govern.”

He is also expected to attend a dinner welcoming leaders from APEC’s 21-member countries.