By this stage, some important anti-submarine techniques had emerged. The Royal Navy employed a variety of craft, including armed trawlers and yachts, and used an acoustic listening device, the hydrophone, as well as mines and depth charges. The Q-Ship, a vessel masquerading as an innocent merchantman but carrying concealed guns, had some success in attacking surfaced U-boats.
Allied aircraft patrolled the seas to force the U-boats to submerge, and key areas were defended by anti-submarine nets. The Dover Barrage was a combination of nets, mines and searchlights, patrolled by light craft. In 1917-18, a similar defensive system was set up between Scotland and Norway, in which the US Navy played a major role. 'Room 40' (British Naval Intelligence) also helped to build up the intelligence picture.
A major advance was the decision of April 1917, vigorously promoted by the Prime Minister, Lloyd George, to move merchant ships in convoy, where destroyers could protect them. Many senior naval officers were doubtful about the convoy, which they associated with the long-gone days of sail. However, shipping losses began to decline, although they still ran at worryingly high levels for some months to come. In September, 316,000 tons were sunk, but in the Atlantic, by then, the crisis was over. The German gamble had failed. The British had not been defeated, and America had entered the war.
Nonetheless, the struggle at sea continued until the end of the war. The French Navy had long played a secondary but nonetheless significant role, and the Allies were joined by the US Navy from mid-1917 onwards. In an attempt to deny bases to U-boats, British surface ships launched several daring but only partially successful raids, the most famous being the attack on Zeebrugge on 23 April 1918.
By the early summer of 1918, the German submarines were clearly on the back foot. From August 1918 the Allied armies advanced steadily on the Western Front, and at the beginning of October the Germans were forced to abandon their naval bases on the Belgian coast. With the German army defeated, the end came on 11 November 1918. As part of the surrender terms, the Royal Navy received 176 U-boats as spoils of war.
Without victory in the First Battle of the Atlantic, the Allies could not have won the war. That victory had been hard won - the German U-boats remained a threat almost to the end of the war. Losses on both sides had been heavy. At the end, few could have guessed that the battle would have to be refought a generation later.