The company was formed in 1844 by the merger of the Midland Counties Railway, the North Midland Railway, and the Birmingham &amp; Derby Junction Railway. The Birmingham &amp; Gloucester Railway joined two years later. The earlier systems met at Derby railway station. The MR established its locomotive works, and later its carriage and wagon works, at Derby.