The Baghdad railway, also known as the Berlin–Baghdad railway ( , , , ), was built from 1903 to 1940 to connect Berlin with the (then) Ottoman Empire city of Baghdad, from where the Germans wanted to establish a port in the Persian Gulf, with a 1600 kilometers line through modern-day Turkey, Syria, and Iraq.