 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.