After the German Army's rapid advance along the North Sea coast in the earliest stages of World War I, the Imperial German Navy found itself without suitable submarines that could be operated in the narrow and shallow environment off Flanders. Project 34, a design effort begun in mid-August 1914, produced the Type UB I design: a small submarine that could be shipped by rail to a port of operations and quickly assembled. Constrained by railroad size limitations, the UB I design called for a boat about long and displacing about with two torpedo tubes. "UB-5" was part of the initial allotment of eight submarines—numbered to —ordered on 15 October from Germaniawerft of Kiel, just shy of two months after planning for the class began.