LONDON - Back home, President Barack Obama has eight months, a dogfight over the Supreme Court and scores of campaign speeches for a successor ahead of him. But overseas, the president already has begun a long, slow goodbye.

As Obama wrapped up his valedictory trip to London on Saturday, he looked very much like a president on his way out the door, reflecting on his tenure and eager to shape how he is remembered. At a town hall with young people, he was asked to look back far more than forward — and he readily obliged. He offered advice for the next president, whoever that is. And then he carved out an afternoon to get out on the links with Prime Minister David Cameron, one of the few world leaders he's made a point of describing as a close friend.

"I think that I have been true to myself during this process," Obama said, reflecting on his presidency and his accomplishments. Obama said he was proud of his health-care overhaul, the Iran-nuclear deal, his handling of what he described as hysteria around the Ebola crisis and "saving the world economy from a Great Depression."

"That was pretty good," he said.

The president acknowledged his victory lap was premature, saying, "I don't think that I'll have a good sense of my legacy until 10 years from now."

But it is hardly too soon for the presidential farewells to begin. Presidents regularly use their last year of foreign travel for sometimes sentimental stopovers in international capitals. The trips can be a way to attract attention while voters at home are distracted by the race for the next president. For Obama, they provide a last chance to capitalize on his relatively resilient popularity abroad.

There are limits to what Obama can accomplish on his farewell tour.

advertisement | advertise on newsday

"I can give you one iron law: The president cannot shape his legacy. And he certainly can't shape it on the basis of trips, public relations and White House press statements in this last year in office," said Anthony Cordesman, a foreign policy analyst at the Center for Strategic and International Studies. "But every president I can think of during my adult life has tried."

The White House tested its playbook in London.

While the president arrived to lend a hand to Cameron, who is bogged down in a campaign to keep Britons from voting to leave the European Union, that was only a slice of his trip.

Obama's political intervention was wrapped in appeals to British sentimentality. On Friday, Obama filled his day paying social visits and making memorable snapshots with the next generation of British royals, including 3-year-old Prince George.

The toddler got to stay up late in his bathrobe to meet the American president and first lady Michelle Obama.

@Newsday

On Saturday, Obama stopped at the Globe theater on the 400th anniversary of William Shakespeare's death. He toured the replica of the open-air playhouse the Bard designed in the 16th century and listened to Hamlet's "to be or not to be" soliloquy.

Obama's visit took a relatively leisurely pace. His days have started later and ended earlier than they used to. His golf outing at The Grove with Cameron marked the first time he'd managed to exercise his golf obsession abroad.

Obama is due Sunday in Hannover, Germany, a trip that is also viewed as a political favor for a close ally. Obama is expected to defend Chancellor Angela Merkel against criticism on trade and her stance on refugees. It will likely be his last trip to Germany, as well.

At his London town hall, Obama fielded a question from a woman who came out as "non-binary" — identifying as neither exclusively male nor female — who pressed Obama on transgender rights. A Sikh man asked him about U.S. policies on religious profiling and discrimination. But largely the group wanted him to reflect on his tenure and offer advice.

Obama passed up the chance to comment on the fierce campaign to succeed him. He said he'd love to see the next president focus on early childhood education, something his administration has not made a top-tier priority. He told young activists to eschew purity for practicality, specifically directing his comments at the Black Lives Matter movement.

advertisement | advertise on newsday

But Obama made no reference to his current battle with Congress over his nominee to the Supreme Court. His longest discussion of pressing policy matters was on trade. The president noted he'd not yet passed the Trans Pacific Partnership, a massive trade deal with Asian-Pacific nations, and that the Trans-Atlantic Trade and Investment pact remains unfinished.

But Obama made no promises about either deal's completion before he leaves office. He does, he noted, still have time to get more done.

"Eight months and 52 days — not that I'm counting," he joked. "I just made that up, I actually don't know. It's roughly something like that."