The Battle of the Atlantic has been called the "longest, largest, and most complex" naval battle in history. The campaign started immediately after the European War began, during the so-called "Phoney War", and lasted more than five years, until the German surrender in May 1945. It involved thousands of ships in more than 100 convoy battles and perhaps 1,000 single-ship encounters, in a theatre covering millions of square miles of ocean. The situation changed constantly, with one side or the other gaining advantage, as participating countries surrendered, joined and even changed sides in the war, and as new weapons, tactics, counter-measures and equipment were developed by both sides. The Allies gradually gained the upper hand, overcoming German surface-raiders by the end of 1942 and defeating the U-boats by mid-1943, though losses due to U-boats continued until the war's end. British Prime Minister Winston Churchill later wrote "The only thing that really frightened me during the war was the U-boat peril. I was even more anxious about this battle than I had been about the glorious air fight called the 'Battle of Britain'."