LIMA, Peru — President Barack Obama spoke briefly with Russian President Vladimir Putin about Syria and Ukraine on Sunday as an economic summit got under way in Peru, in their first known conversation since Donald Trump was elected the next U.S. president.

The two leaders were seen chatting at the start of the opening session of the Asia-Pacific Economic Cooperation summit in Lima. They stood off to the side together momentarily with aides close by before shaking hands and then taking their seats around a table.

The White House said the conversation lasted four minutes.

Although reporters present couldn’t hear what they said, the White House said Obama encouraged Putin to uphold his country’s commitments under the Minsk deal aimed at ending the Ukraine conflict. The White House said Obama also called for U.S. Secretary of State John Kerry and Russian Foreign minister Sergei Lavrov to keep working in initiatives with other countries to lower violence in Syria and alleviate suffering.

The short interaction came amid intense speculation and concern about whether Trump’s election might herald a more conciliatory U.S. approach to Russia. Under Obama, the U.S. has enacted severe sanctions on Russia over its aggressive behavior in Ukraine and has sought unsuccessfully to persuade Moscow to stop intervening in Syria’s civil war to help prop up Syrian President Bashar Assad.

Trump and Putin have already signaled they may pursue a less antagonistic relationship after Trump takes office in January. In a phone call shortly after Trump was elected, Putin congratulated him and expressed readiness for a “partner-like dialogue,” the Kremlin said.

In the run-up to the election, the U.S. also accused Russia of trying to interfere in the election, including by hacking into Democratic Party email systems. Obama has raised concerns directly to Putin ahead of the election about Russian hacking, and the U.S. also registered complaints through a hotline set up to avert accidental nuclear war.

Throughout the campaign, the Kremlin insisted that it had no favorites and rejected the claims of interference in the U.S. election.

The meeting came as Obama prepared for planned separate talks with the leaders of Australia and Canada before wrapping up the final foreign trip of his presidency.

Both countries helped negotiate a multinational trade agreement with the U.S. and nine other Pacific Rim countries. But Congress is unlikely to ratify the deal, dealing a blow to Obama’s once high hopes of having the agreement become part of his presidential legacy.

Trump says trade deals can hurt U.S. workers, and he opposes the sweeping Trans-Pacific Partnership agreement.

Besides participating in meetings Sunday with other world leaders attending the annual Asia-Pacific Economic Forum taking place in Peru’s capital, Obama was sitting down first with Prime Minister Malcolm Turnbull of Australia, a U.S. ally and partner in the trans-Pacific trade deal.

The president also planned to speak with Canadian Prime Minister Justin Trudeau, whose nation is another TPP partner.

Before boarding Air Force One for the flight to Washington, Obama was to answer questions from the journalists who accompanied him to Greece, Germany and Peru.

Trump’s election overshadowed every stop on Obama’s trip. The president went to once unimaginable lengths to defend the real-estate mogul and reality TV star who he had repeatedly denounced during the campaign as “temperamentally unfit” and “uniquely unqualified” to be president.

“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 in response to a question about Trump during a forum here Saturday with some of Latin America’s future leaders.

“As I’ve always said, how you campaign isn’t always the same as how you govern,” he added.

Obama’s suggestion is that Trump could soften some of his more hard-line positions on immigration, terrorism and other issues once he confronts the reality of having to run the country. But the candidates Trump announced this past week for key national security posts — Alabama Sen. Jeff Sessions for attorney general, retired Lt. Gen. Michael Flynn for national security adviser and Kansas Rep. Mike Pompeo to lead the CIA — sent a signal that Trump intends to lead exactly as he said he would during the campaign.

Leaders in every region of the world have expressed concern about Trump’s stances on immigration, trade, NATO and other matters.

Associated Press writer Josh Lederman contributed to this report.