Seventy years ago Operation Deadlight was drawing to a close. In this operation the Royal Navy towed surrendered German U-boats from Lough Foyle and Loch Ryan into the Atlantic to be sunk by warships or aircraft.
Hitler's once feared Ubootwaffe was consigned to the depths from which it had preyed on merchant ships during the Battle of the Atlantic, the longest campaign of the Second World War.
By February 11, 1946 the U-boats had been sunk or, in a few cases, handed over to allies as prizes. The Ubootwaffe had surrendered formally to Admiral Sir Max Horton, Commander-in-Chief Western Approaches, at Lisahally on May 14, 1945. Now, the final chapter in their history was over.
But why did Northern Ireland play such a conspicuous part in that final chapter?
The reason was quite simple: Northern Ireland, especially the port of Londonderry, had been critical to the success of anti-U-boat operations.
After the fall of France in June 1940 convoys had to be rerouted around the north Irish coast to avoid Nazi submarines operating from their new French Atlantic port bases. The Derry shore base, HMS Ferret, provided the Royal Navy with its most westerly base for escort ships.
The importance of the base is indicated clearly by the fact that escorts based on the Foyle outnumbered considerably the combined totals at Liverpool and on the Clyde in 1943. At its greatest strength, the escort force in the Foyle numbered 139 ships, with many ancillary vessels also based in the river and the lough. The combined Liverpool and Clyde total was under 100.
Each ocean escort group usually included six or more ships, mostly smaller vessels such as corvettes, sloops or destroyers. A group would meet a convoy off the Canadian coast and shepherd it to a point north of Lough Foyle, where a local escort from the Clyde or Belfast would take over, and the ocean escort sailed up the Foyle to await its next task. However, the ships were not alone in defending convoys. Aircraft were increasingly important, and yet again Northern Ireland proved pivotal. Airfields for long-range aircraft were available or built at Aldergrove, Nutts Corner and Ballykelly.
Flying boats - Sunderlands and Catalinas - flew from Castle Archdale in Co Fermanagh. To reach their patrol areas they overflew a small stretch of neutral Ireland with the Irish Government's permission through an agreement that created the Donegal Corridor. Aircraft flying into and out of RAF Ballykelly, near Limavady, were also allowed to fly over Donegal.
In another little-known aspect of Irish co-operation with the UK, the escort force had an air-sea rescue trawler, HMT Robert Hastie, based at Killybegs in Co Donegal. On arriving in Killybegs, the Robert Hastie was welcomed by a party that included an RAF officer and the RUC head constable from Belleek.
Another piece of Irish assistance was the coast-watching service, which reported sightings of suspicious maritime activity to the service's headquarters in Dublin from lookout posts around the entire coastline.
Intelligence gleaned from this information was often made available to the British authorities and played an important part in the war against the U-boats.
U-boats, even when surfaced, were small targets and difficult to see. When war broke out there were no suitable airborne radars to detect surfaced boats, especially at night, and so the U-boats enjoyed what they called a "happy time".
However, a basic airborne radar became available and showed promise. This was developed into a more effective operational set.
But the real breakthrough came with the invention of the cavity magnetron, which allowed the development of centimetric radar. Known as ASV III, this was so much more effective in detecting U-boats that it is considered one of the critical factors in winning the Battle of the Atlantic.
The cavity magnetron was the work of three UK physicists - John Randall, Harry Boot and James Sayers. Sayers played a major role in refining the invention, which was given free to the US on its entry into the war in December 1941. Sayers, born in Corkey, Co Antrim, attended Ballymena Academy and Queen's before obtaining his PhD at Cambridge. Incidentally, this invention has a place in almost every household today - as the microwave oven.
Among those who tested airborne radars was a Co Antrim native. Terence Bulloch, from Lisburn, became Coastal Command's top-scoring pilot of the war. He possessed excellent eyesight and on occasion spotted a U-boat on the surface in such adverse sea conditions that the boat's captain believed himself invisible.
Bulloch rewrote the tactical manual on attacking U-boats. His ideas, which differed from those of higher authority, saved convoys HX217 and SC111 from destruction in December 1942.
Flying from Reykjavik in Iceland, Bulloch spotted U-611 through a hailstorm, attacked, and sank the surfaced boat. He then spotted, attacked and probably sank another.
Although he had no more depth charges, he was able to force other boats below the waves where, slow and blind, they ceased to be a menace.
By war's end he had sunk at least four boats, more than anyone else, while No 120 Squadron, with which he served at Aldergrove and Reykjavik, had sunk 14, damaged eight and shared the destruction of another three.
More than anything else, Bulloch proved the value of anti-submarine aircraft, especially the excellent American Consolidated B-24 Liberator, which possessed remarkable endurance.
Ships based in the Foyle accounted for many U-boats. The turning point of the battle was May 1943, when the U-boats finally lost the initiative.
Lieutenant Commander Evelyn Chavasse, from Co Cork, commanded the Canadian C2 escort group out of Derry and, while escorting convoy HX237, his ship HMS Broadway sank U-89, while HMS Lagan and HMCS Drumheller sank U-753.
Other boats were beaten off. Attacks on convoys ONS5 and SC129 saw more U-boats destroyed, with ships from the Londonderry Escort Force claiming most of them.
Intercepting radio signals to and from U-boats were also vital elements of the battle since such signals allowed the Allied commanders to establish where boats were and which convoys might be their targets.
Coupled with the breaking of the German Enigma codes, this signals that intelligence used to advantage the German belief that their communications systems were so secure and advanced as to be unbreakable.
That belief helped bring about their defeat.
Other factors in winning the battle included training sailors and airmen, in which role Derry also featured with the duplicate Western Approaches Training Unit in the city and training for naval air squadrons at Eglinton.
Swordfish bombers that could operate from small, improvised aircraft carriers and provide air cover for convoys right across the Atlantic were based at Maydown.
The fragile Swordfish proved their worth by preventing many attacks and saving many lives.
In the end, the defeat of the U-boats came about through a combination of operational and scientific research, development of tactics, ships, aircraft and equipment, training of sailors, airmen and support personnel, and strategic insight through intelligence and excellent leadership.
All were packaged in a manner that the Germans, in spite of their reputation for efficiency, could never hope to emulate.
And Northern Ireland was an important part of the package.
Richard Doherty is the author of Churchill's Greatest Fear: The Battle of the Atlantic - 3 September 1939 to 7 May 1945 (Pen & Sword Military)