At the beginning of 1945, the Ministry of Transport was created, as well as the Regional Directorate of National Railways. Many pre-war locomotives were sent to the Soviet Union. Poland received many German locomotives as a compensation for war losses. In June, the rail connection with Warsaw was opened, using a temporary railway station made of warehouses. On 15 September 1945, PKP took over management of all railway lines on new Polish territory from the Soviet Union. Most of these lines were either destroyed or inaccessible. The railways in the country were divided into 10 districts.