British General Edmund Allenby, Commander-in-Chief of the Egyptian Expeditionary Force (EEF), had won a decisive victory against the German General Erich von Falkenhayn, commander of Ottoman forces in Palestine, at the Battle of Mughar Ridge on 13 November.
The British Empire victory forced von Falkenhayn to withdraw his Seventh and Eighth Armies (commanded by Fevzi Pasha and Kress von Kressenstein respectively) and move his headquarters from Jerusalem to Nablus on 14 November.
As the Ottoman III Corps (Seventh Army) reached Jerusalem via the Hebron road after its defeat at Beersheba, it was ordered to develop defences around Jerusalem.
This corps held the city while the XX Corps retreated from Junction Station into the Judean Hills towards Jerusalem.
As they retired the XX Corps left strong rearguards to stop or slow the British advance.
Time was needed to construct defences and for reorganisation of the depleted and disorganised Seventh Army.
When they arrived in the city XX Corps took over responsibility for Jerusalem's defences, while III Corps continued to move northwards from Jerusalem along the Nablus road.

The British War Cabinet had cautioned Allenby not to commit to any operations that might not be sustainable in the long term if the strength of British forces in the area could not be maintained.
Their concerns were possibly linked to a peace proposal published on 8 November by the new Russian Bolshevik government between Russia and Germany.
The document, scheduled to be signed on 3 March 1918, would constitute a separate peace treaty and result in the withdrawal of all Russian troops from the war.
All German forces on the eastern front could then turn their attention to fighting British and French forces elsewhere.

Allenby was aware of the lack of accurate maps of the Judean Hills and that the history of previous campaigns in the region gave clear warnings against hasty or lightly supported assaults on the strong western ramparts.
His front-line forces had been fighting and advancing for an extended period fighting many miles from their bases and were tired and depleted.
Now 35 miles (56 km) from the railhead at Deir el Belah, Allenby's troops did not have a line of defensive entrenchments behind which they could stop a concerted push by these two Ottoman armies.
Such a counterattack could well see them driven back to Gaza and Beersheba.

Allenby reviewed the threat of counterattack and his supply situation and decided that a force large enough to attack into the Judean Hills and a separate force to operate on the maritime plain could be maintained far from base.
He decided to quickly attack Fevzi Pasha's Ottoman 7th Army in the Judean Hills with the hope of capturing Jerusalem.
This would keep pressure on this army in the hope of denying them time to complete their reorganisation, dig deep trenches or worst of all, counterattack.
British General Edmund Allenby, Commander-in-Chief of the Egyptian Expeditionary Force (EEF), had won a decisive victory against the German General Erich von Falkenhayn, commander of Ottoman forces in Palestine, at the Battle of Mughar Ridge on 13 November. The British Empire victory forced von Falkenhayn to withdraw his Seventh and Eighth Armies (commanded by Fevzi Pasha and Kress von Kressenstein respectively) and move his headquarters from Jerusalem to Nablus on 14 November. As the Ottoman III Corps (Seventh Army) reached Jerusalem via the Hebron road after its defeat at Beersheba, it was ordered to develop defences around Jerusalem. This corps held the city while the XX Corps retreated from Junction Station into the Judean Hills towards Jerusalem. As they retired the XX Corps left strong rearguards to stop or slow the British advance. Time was needed to construct defences and for reorganisation of the depleted and disorganised Seventh Army. When they arrived in the city XX Corps took over responsibility for Jerusalem's defences, while III Corps continued to move northwards from Jerusalem along the Nablus road.
The British War Cabinet had cautioned Allenby not to commit to any operations that might not be sustainable in the long term if the strength of British forces in the area could not be maintained. Their concerns were possibly linked to a peace proposal published on 8 November by the new Russian Bolshevik government between Russia and Germany. The document, scheduled to be signed on 3 March 1918, would constitute a separate peace treaty and result in the withdrawal of all Russian troops from the war. All German forces on the eastern front could then turn their attention to fighting British and French forces elsewhere.
Allenby was aware of the lack of accurate maps of the Judean Hills and that the history of previous campaigns in the region gave clear warnings against hasty or lightly supported assaults on the strong western ramparts. His front-line forces had been fighting and advancing for an extended period fighting many miles from their bases and were tired and depleted. Now 35 miles (56 km) from the railhead at Deir el Belah, Allenby's troops did not have a line of defensive entrenchments behind which they could stop a concerted push by these two Ottoman armies. Such a counterattack could well see them driven back to Gaza and Beersheba.
Allenby reviewed the threat of counterattack and his supply situation and decided that a force large enough to attack into the Judean Hills and a separate force to operate on the maritime plain could be maintained far from base. He decided to quickly attack Fevzi Pasha's Ottoman 7th Army in the Judean Hills with the hope of capturing Jerusalem. This would keep pressure on this army in the hope of denying them time to complete their reorganisation, dig deep trenches or worst of all, counterattack.
Battle of Jerusalem