Leaders of NATO and the European Union nations have signed a "historic deal" that boosts their co-operation in defence against new challenges.

The deal was signed Friday in Warsaw, shortly before a NATO summit opened there to show the Western world's unity in facing threats from the East and the South. It was signed by NATO Secretary-General Jens Stoltenberg, European Council President Donald Tusk and European Commission President Jean-Claude Juncker.

Stoltenberg said it was a "historic deal" that gave "new substance, new impetus" to the EU-NATO partnership in fighting hybrid warfare, cyberattacks and containing the massive wave of illegal migrants.

Story continues below advertisement

European Council President Donald Tusk said the new deal would mend a situation in which it could seem sometimes that NATO, a military alliance, and EU, a political and economic bloc, are "on different planets," not in the same city. Both have headquarters in Brussels, Belgium, though some nations belong to only one organization.

Hybrid warfare is the use of different tools such as propaganda and psychological campaigns, cyberattacks, and use of political, economic and energy pressure, among others.

Tusk says that the "geopolitical consequences" of Britain's exit from the EU, or Brexit, "may be very serious" but he does not think it will inspire other EU members to follow suit.

Tusk, speaking alongside President Barack Obama and European Commission head Jean-Claude Juncker, said it was important to send a message to the world that Brexit, "as sad and meaningful as it is, is just an incident, and not the beginning of a process."

"To all our opponents, on the inside and out, who are hoping for a sequel to Brexit, I want to say loud and clear: you won't see on the screen the words: "To be continued."

On Thursday, Tusk seemed to leave the possibility open for Britain to remain in the EU, when he said on Polish TVN24 that, according to the European Treaty, " The European Union must wait for the British government to decide whether it wants to leave the union or whether it wants to stay in it."

He said: "There is no freedom in Europe without trans-Atlantic solidarity." That echoed a slogan of Poland's Solidarity freedom movement in the 1980s that helped peacefully bring down communism in Europe.

Story continues below advertisement

"We are taking care of the unity of the Western political community, and that is key."

Warsaw appears to be the most highly secured city in the world as the city hosts a NATO summit, an event that comes after a string of recent extremist attacks across the world.

Helicopters are hovering above the National Stadium, where the summit is being held, while 6,000 police officers, backed up by soldiers, gendarmes, firefighters and other security officials, are out on the streets.

President Barack Obama and leaders from the 27 other NATO member states are attending the summit, as well as leaders from the United Nations, European Union and World Bank, among others.

The security efforts are most heavily concentrated at the stadium, which has been encircled by a metal barrier, with security also high around the hotels housing the many VIPs.

The airspace over Warsaw is also being monitored closely, with a ban on flights in a 100 kilometre (60 mile) radius around stadium. Violators face the risk of being shot down.

Story continues below advertisement

A spokesman for Russian President Vladimir Putin says Moscow is willing to co-operate with NATO although it acts toward Russia like an enemy.

Dmitry Peskov made the comments on Friday as the summit of NATO member states opened in Warsaw.

Peskov said Moscow "has always been open for dialogue" with NATO, especially to fight what it sees as a "genuine threat" — terrorism.

Peskov tells reporters: "Russia is not looking (for an enemy) but it actually sees it happening. When NATO soldiers march along our border and NATO jets fly by, it's not us who is moving closer to the NATO borders."

NATO Secretary-General Jens Stoltenberg says Russia's hostile actions in Ukraine have spurred the alliance to raise its defences on the eastern flank.

Stoltenberg spoke to reporters before the NATO summit opened in Warsaw on Friday to approve, among others, the presence of four battalions in Poland and the Baltic states. These nations feel threatened after Russia annexed Crimea from Ukraine in 2014 and continues to back separatists in eastern Ukraine.

Story continues below advertisement

Stoltenbeg said: "No one was talking about reinforcing deterrence" before the aggressive action in Crimea.

Stoltenberg says deterrence and defence combined with constructive dialogue are the best approach in ties with Russia. He adds that the Russia-NATO Council will meet next week.

Poland's President Andrzej Duda says that Britain could seek even stronger ties within NATO if it leaves the European Union — but avoids a breakup of the United Kingdom.

Duda was speaking alongside NATO Secretary-General Jens Stoltenberg hours before the alliance summit was to open in Warsaw on Friday.

Duda said that Britain's exit from the EU would do harm to the country if Scotland and Northern Ireland remained in the EU. Both of those regions voted to remain in the EU in the June 23 referendum.

"But if Britain left but remained whole, then, paradoxically, it would seek closer ties with other organizations and its role in NATO would increase," Duda said.

Story continues below advertisement

Germany's defence minister says NATO is right to deploy troops on its eastern frontiers to counter what she called a "completely unpredictable and aggressive Russia."

Ursula von der Leyen says the Baltic states want protection because Russia's annexation of Crimea shows that Moscow "doesn't respect borders."

She told German broadcaster ARD on Friday that NATO needs to maintain a dialogue with Russia from what she called a "position of strength."

Von der Leyen said "it's important that NATO deploys with such strength that it's clear nobody can see an advantage in attacking this military alliance." She spoke as heads of NATO member states were meeting in Poland, where relations with Russia will be among the top issues.

The NATO summit in Warsaw is being held in a district of Warsaw that Poles view as a symbol of Russian betrayal of their nation. It was in that district, Praga, which lies on the eastern bank of the Vistula River, that Red Army troops sat for 63 days throughout the 1944 Warsaw Uprising, a revolt against Nazi Germany, giving almost no substantial support to the Poles. The result was the near-total destruction of Warsaw and the death of up to 200,000 civilians.