WARSAW, Poland (AP) — President Barack Obama on Friday reaffirmed his confidence that the U.S. and its European allies will continue to work together on critical global challenges despite the decision by Britain to leave the European Union.

Speaking at the opening of two days of meetings with European leaders, Obama said the U.S. and the EU agreed they can do more to improve security, share information and stem the flow of foreign fighters to prevent terror attacks.

But he also said leaders on both sides of the Atlantic need to address the economic frustrations of their people, who feel they are being left behind by globalization.

"Our governments, including the EU cannot be remote institutions," said Obama, as he stood alongside European Council President Donald Tusk and European Commission President Jean-Claude Juncker. "They have to be responsive and move more quickly with minimal bureaucracy to deliver real economic progress in the lives of ordinary people."

In an op-ed published in the Financial Times on Friday, Obama called on European leaders to stand firm against Russia, Islamic State terrorism and other challenges facing NATO — even as a Britain is poised to retrench from Europe. He argued that Britain's looming exit only makes the NATO alliance a more important force for cooperation in the region.

"I believe that our nations must summon the political will, and make concrete commitments, to meet these urgent challenges. I believe we can — but only if we stand united as true allies and partners," Obama wrote.

Obama and the two European leaders delivered a unified message that Britain's exit, while serious, will not divide the broader effort of the nations to work together on matters including the war in Afghanistan, the fight against the Islamic State, the migrant crisis and climate change.

Arguments that the split suggests the "entire edifice of Europe security and prosperity is crumbling" are misplace hyperbole, Obama said during remarks with Tusk and Juncker.

The exit negotiations have not yet been formally triggered by Britain and could take up to two years.

"I am confident that the UK and the EU will be able to agree on an orderly transition to a new relationship, as all our countries stay focused on ensuring financial stability and growing the global economy," Obama wrote.

Although the U.S. has a keen interest in the talks, the president's words have limited impact and influence. Obama's trip, which includes a stop in Spain, is expected to be his last trip to Europe as president. The president arrived prior to the shooting attack that killed five police officers in Dallas.

The task of trying to shape the talks to serve U.S. interests and mitigate damage largely will fall to his successor. Still, in his remaining time in office, Obama has sought to use his popularity in Europe and his presidential megaphone to defend international cooperation and the "European project" and will urge other leaders to speak up more forcefully.

The White House has acknowledged that Obama's message has to some degree failed to persuade on both sides of the Atlantic. Republican presidential candidate Donald Trump has suggested he would seek to pull back from Europe, even hinting the U.S. could withdraw from NATO, the 67-year-old cornerstone of European security. His Democratic rival, Hillary Clinton, has suggested she would continue, if not deepen, Obama's approach. But even Clinton has rejected the president's push for massive, multinational free-trade agreements.

That call for renewed focus on alliances extends to NATO, which U.S. officials have said stands at an "inflection point" away from its post-Sept. 11 focus on the mission in Afghanistan to an era with more diffuse and varied threats.

Leaders in Warsaw for meetings on Friday and Saturday will announce efforts to deter what they see as continued aggression from Moscow. They'll discuss increasing NATO involvement in countering the threat posed by the Islamic State group in Syria, and the migration crisis also sparked the Middle East and North Africa. The officials will also discuss ways to improve cooperation on cyberwarfare.

Obama met Friday with NATO Secretary-General Jens Stoltenberg to review the agenda before visiting with the summit's host, Polish President Andrzej Duda.