Many of Israel's railway lines were constructed before the founding of the state during Ottoman and British rule. The first line was the Jaffa–Jerusalem railway, followed by the Jezreel Valley railway, which formed part of the greater Hejaz railway. World War I brought the creation of multiple new lines out of military needs: Portions of what is now the Coastal railway were built simultaneously by the Turkish and British and later merged during the British Mandate. Southern lines were also built by the warring states—from the north by the Ottomans, and from Rafah in the west by the British.