By KATHLEEN HENNESSEY, Associated Press

WARSAW, Poland (AP) — President Barack Obama opened a five-day, two-country mission early Friday to buck up a beleaguered Europe and brush back an aggressive Moscow.

On what is expected to be his last presidential visit to the continent, Obama is due to attend a summit of NATO allies in Warsaw, before moving on to Seville and Madrid for his first presidential visit to Spain. In both corners of the continent, he'll be surrounded by leaders still reeling from Britain's decision to pull out of the European Union and sorting through uncertainty about the future of the decades-old experiment in international cooperation.

The White House says Obama will offer words of reassurance that the departure — whenever it occurs — won't disrupt the decades-old trans-Atlantic ties that bind. He'll emphasize that Britain's exit, which does not affect its membership in NATO, only makes the 28-member military alliance more essential and its cooperation with the European Union more important. And amid leaders' anxiety about whether his possible successor, Republican Donald Trump, would retrench from Europe, Obama will make case for stronger alliances and the benefits of globalization.

"He feels like all leaders in Europe and in the United States — including himself — have a responsibility in the face of all these challenges to the trans-Atlantic order that we've built to make the case on behalf of the values that the United States and Europe have stood for and the benefits to our countries," said Ben Rhodes, Obama's deputy national security adviser.

The president's visit is his first chance to deliver that message in person, both to the European leaders tasked with smoothly navigating the tricky divorce and British Prime Minister David Cameron, whom Obama personally tried but failed to save from the wave of anti-European sentiment that fueled the vote.

Obama's first stop later Friday morning is a sit-down with Donald Tusk and Jean-Claude Juncker, presidents of the European Council and European Commission, respectively. White House officials said Obama plans to discuss the fallout from the referendum and weigh in on how he thinks negotiations should proceed.

Obama's agenda goes far beyond the so-called Brexit fallout. NATO plans to tout new efforts to send signals to Russia. The alliance recently agreed to bolster its presence in the east by deploying four multinational battalions on a rotational basis to Estonia, Latvia, Lithuania and Poland.

Obama also will meet Saturday with Ukraine's President Petro Poroshenko to discuss the status of the stalled 2015 Minsk peace deal, which was intended to ease tensions after Russia's incursion into eastern Ukraine. Ukraine has accused Russia of failing to fulfill its obligations by not withdrawing its troops, although the Kremlin disputes that claim.

"Russia is trying to engage in a battle of ideas," Rhodes said aboard Air Force One, adding that Moscow felt threatened by countries like Ukraine that want closer ties to Europe. "That cannot simply be swept under the rug."

NATO leaders will also discuss the rising threat of Islamic State attacks in Europe, the effort to address the migrant crisis caused by violence in the Middle East and North Africa and continued commitments to the mission in Afghanistan, where Obama acknowledged Wednesday the security situation was too fragile to stick to the planned timetable for drawing down troops.

The unsettling mix of issues presents a striking contrast to the Europe that Obama met eight years ago, when he bounded on the world stage with a massive campaign speech in Berlin and was embraced by a European public eagerly seeking leadership in Washington. In his first visit as president, Obama spoke hopefully of dealing with Moscow on nuclear weapons and looked ahead to new era of firmer alliances. "This is our generation. This is our time," he said during a visit to Strasbourg, Germany for a NATO summit in 2009.

Obama recently has presented a more wary, defensive case for global cooperation. White House officials say he'll repeat his case against isolationism in remarks in Spain, where he is due to meet with both Interim President Mariano Rajoy and King Don Felipe VI and hold a town hall with young people.

Some are hoping Obama will put forward an updated vision for U.S. relations with the new Europe.

"The White House has yet to fully acknowledge the shift in Europe today and the challenges that it faces," said Heather Conley, a Europe expert at the Center for Strategic and International Studies. "The European project has been placed into fundamental question."