They both have their headquarters in Belgium's capital and they profess many of the same values and goals, but until recently the NATO defense alliance and the European Union economic bloc have acted like wary neighbors with little to say to one another.

That's despite the fact that 22 prosperous Western democracies with more than 450 million citizens are members of both organizations, and both have been key to building and keeping the postwar order in Western Europe.

This summer, the old standoffish ways are to change dramatically and the keyword will be cooperation, primarily because of Russia's new military might and assertiveness, the threat of armed Islamic extremism and Europe's continuing migration crisis.

Some in the EU in the past have seen NATO as a Trojan horse for the trigger-happy United States to keep exercising domination over Europe. Meanwhile, some at NATO saw the EU — which also has security and military responsibilities — as a potential competitor.

"Neither of these two institutions that are separated by, what, two miles or something here in Brussels, should be separated by the kind of institutional distance that we've seen in the past," Douglas Lute, U.S. ambassador to NATO, said recently.

When U.S. President Barack Obama and other NATO leaders sit down together in Warsaw next month, the two multinational groupings should formally agree to cooperate in several fields, including fighting new threats to their own citizens' security and helping bolster the defense and law-enforcement institutions of fragile states like Libya and Iraq.

"We need to take our cooperation to a higher level, and that's exactly what we are working on now," NATO Secretary-General Jens Stoltenberg said as he hosted a visit by the EU's foreign policy chief, Federica Mogherini, to alliance headquarters last month.

Mogherini, a former Italian foreign minister, said the official calendar this summer will provide "excellent synergy" for forging the better working relationship between the two international organizations that she and Stoltenberg have advocated.

The week before NATO's July 8-9 summit, Mogherini is scheduled to present the EU's first redrafted global security strategy in 13 years to a meeting of the bloc's 28 leaders in Brussels.

The new EU document is expected to take note of a dramatically altered strategic landscape: one where Russia is an increasingly worrisome neighbor, and where the Islamic State extremist group can exploit the territorial enclave it has carved out in the Middle East to stage bloody attacks in European capitals, including Brussels itself.

"No country alone, and not even a united Europe, can carry the whole world on its shoulders," Mogherini said in a major policy address she delivered in Paris in April. She predicted that "our cooperation with the U.S. and NATO can only grow stronger."

Already this year, NATO and the EU have reached formal agreements on the swift exchange of information in the event of cyberattacks, as well as deployment of alliance warships to the Aegean Sea to help stop human traffickers from bringing people from Turkey to Greece.

Institutional relations between NATO and the EU were launched in 2001, and in 2010, NATO allies expressed their determination to improve the NATO-EU strategic partnership. But only recently has there been much payoff.

"We have concluded more arrangements in the past three months than in the previous 13 years," Stoltenberg said last month. "We can and must do more."

Already, NATO military and civilian experts are pondering how they can use lessons learned in the Aegean to support Operation Sophia, an EU action mounted to shut down people-smuggling operations in the central Mediterranean.

Work is also underway to draft "playbooks" to help NATO and the EU closely coordinate their response to so-called hybrid threats — the use of nonconventional tactics as well as military means to achieve a strategic objective — and react quickly in tandem when they occur.

"This focuses on information-sharing, civil preparedness, cyber and strategic communications," said NATO spokeswoman Oana Lungescu. "The idea of the playbooks is to identify who does what if our nations and organizations come under hybrid attack."

Russia's prowess in mobilizing non-military and unconventional assets — including social and mass media, energy and other economic resources and civil organizations, showcased in the Kremlin's 2014 takeover of Crimea — has been of particular concern to both NATO and the EU.

"What these organizations are discovering is that NATO has some capabilities, the EU has others, more in the civilian component, and that the organizations are highly complementary if they work together," said Heather Conley, a former U.S. deputy assistant secretary of state.

A joint statement is being prepared for signature in Warsaw, said an alliance official who was not authorized to make public remarks and spoke on condition of anonymity. That document is expected to focus on specific areas for future pooled efforts, including countering hybrid and cyber threats, increasing maritime security and helping partner nations build their military.

At both NATO and the EU, "pragmatism finally has sort of taken hold," said Conley, director of the Europe Program at the Washington-based Center for Strategic and International Studies. She cautioned, however, that "it's going to take quite a while for these two organizations to really figure out their modus operandi in the future."