By Robin Emmott

BRUSSELS (Reuters) - NATO and the European Union promised closer defense ties at a summit on Tuesday to deter Russia and counter Islamic militants on Europe's borders, seeking a show of unity days after Britain voted to leave the EU.

Unnerved by the departure of Europe's biggest-spending military power, EU and NATO officials hope a new strategy to share information and work together from the Baltics to the Mediterranean will shore up defenses that have long relied on Britain to provide ships, troops and commanders.

"Cooperation between the European Union and NATO was important before the UK vote. It has become even more important now," NATO Secretary-General Jens Stoltenberg told reporters at the EU summit in Brussels.

"We have to work even harder," he said, stressing that Britain remained committed to transatlantic security as a member of the North Atlantic Treaty Organisation.

Britain makes up about a quarter of European military spending and pays for about 15 percent of EU-led missions. But it has also blocked deeper EU defense cooperation, fearing an EU army that would be an affront to its sovereignty.

In a call for unity after the EU referendum result left Britain in disarray, EU foreign policy chief Federica Mogherini said Europe needed "to guarantee that this uncertainty, this chaos, is not extended to the other EU member states."

Mogherini presented the EU's new five-year global strategy to Stoltenberg and EU leaders including British Prime Minister David Cameron, which sets out how the European Union could act more independently of the United States if needed.

Britain, as a leading member of NATO, has pledged to work with the European Union and avoid any isolation stemming from its decision to leave the bloc.

Having failed to stabilize its neighborhood economically over the past decade, Europe now faces a myriad of threats on its borders, from a more assertive Russia following Moscow's 2014 annexation of Ukraine's Crimea, to a migrant crisis stemming from strife in North Africa and the Middle East.

London is not expected to stand in the way of a formal EU-NATO cooperation pact set to be signed at an alliance summit in Warsaw in July, as the two pillars of Western security aim to overcome years of mutual distrust and competition despite often having similar goals.

The European Union's focus is to reverse years of defense cuts and allow governments to develop new tanks and ships together without relying heavily on the United States, which has been Europe's protector since the end of World War Two.

Mogherini's five-year plan says EU governments need "all major equipment to respond to external crises and keep Europe safe. This means having full-spectrum land, air, space and maritime capabilities."

(Editing by Hugh Lawson)