U-427 surrendered at Narvik, Norway, on 9 May 1945, and was transferred to Loch Eriboll, Scotland, on 19 May, and later to Loch Ryan as part of "Operation Deadlight" when it was sunk on 21 December 1945 at .
