LIMA, Peru -- President Barack Obama said Sunday he’d avoided ethical scandals throughout his administration by trying to follow the spirit, not just the letter of the law, and suggested President-elect Donald Trump would be wise to follow his example.

Closing out his final foreign trip, Mr. Obama was asked about the complex conflict-of-interest questions Trump faces as he transitions from real estate mogul to Oval Office occupant. Though Mr. Obama declined to explicitly offer Trump advice, the president said he’d been served well by selling his assets and investing them in Treasury bills.

“It simplified my life,” Mr. Obama said. “I did not have to worry about the complexities of whether a decision that I made might even inadvertently benefit me.”

Get Breaking News Delivered to Your Inbox

Good government advocates have criticized Trump’s decision not to liquidate his sprawling business interests, but put them in a blind trust entrusted to his children, who are playing major roles in helping him form his administration and are expected to remain involved in one capacity or another.

Mr. Obama said he was proud his administration hadn’t faced the scandals he said have “plagued” other administrations. He said after eight years, he felt he could tell Americans he’d lived up to his promise to run an accountable and ethical government.

He summed up the rule of thumb his first White House counsel used to come up with policies for his administration: “If it sounds like it would be fun, then you can’t do it.”

Mr. Obama’s remarks came as he concluded his final world tour as president. For Mr. Obama, it was the last time he’d take questions on foreign soil, a staple of his overseas trips that his administration has seen as an important symbol of America’s commitment to a rigorous free press.

Mr. Obama chatted briefly earlier Sunday with Russian President Vladimir Putin as the summit got under way. The conversation, which was likely to be the leaders’ last face-to-face interaction, lasted just four minutes.

Mr. Obama later told reporters he encouraged Putin to uphold his country’s commitments under the Minsk deal aimed at ending the Ukraine conflict. Both the White House and the Kremlin said the leaders had agreed that U.S. Secretary of State John Kerry and Russian Foreign minister Sergei Lavrov should keep working throughout Mr. Obama’s final months on initiatives to lower violence in Syria and alleviate suffering.



Putin, speaking later in Lima, said he and Mr. Obama had noted that while their working relationship had been difficult, they’d “always respected each other’s positions -- and each other.”

“I thanked him for the years of joint work, and said that at any time, if he considers it possible and will have the need and desire, we will be happy to see him in Russia,” Putin said.

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 Mr. 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.

Questions about Trump trailed Mr. Obama throughout his final overseas trip, as anxious world leaders quizzed him on Trump’s stances on key issues like trade, foreign policy and the NATO alliance. On his final day in Peru, Mr. Obama sought to reassure world leaders gathered here that their longstanding ties with the U.S. wouldn’t falter under Trump.

Sitting down with Prime Minister Malcolm Turnbull of Australia, Mr. Obama said he assured Turnbull that the alliance between their countries would remain as strong as ever. Turnbull said he and Mr. Obama were of the mind on trade - an issue Trump sees quite differently. Still, he added that Australia wanted the U.S. to succeed under Trump.

Both the U.S. and Australia helped negotiate the Trans-Pacific Partnership, a multinational trade agreement involving 10 other Pacific Rim countries. But Congress is unlikely to ratify the deal, dealing a blow to Mr. 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 TPP.

Mr. Obama, who met with TPP country leaders the day before, said they’d told him they want to move ahead with the deal.

“Preferably, they’d like to move forward with the United States,” Mr. Obama said.

He alluded to a competing deal China is trying to broker that he said would be worse for workers and environmental concerns.

Meeting with Canada’s Prime Minister Justin Trudeau, Mr. Obama said he had no doubt the close and important U.S.-Canada relationship will persist after he leaves office, saying that’s been constant with Republican and Democratic administrations alike. Trudeau said he’s invited President-elect Donald Trump to visit Canada soon after Inauguration Day and hopes to welcome him to Canada.