After the Allied win at Mughar Ridge on 13th November, 1917, the British commander in chief of the Palestine Front, Sir Edmund Allenby, marched eastwards towards Jerusalem. While the British right headed for the Holy City via the Judea Hills the left adopted a defensive position at Jaffa. The British general was aware that Turkish reinforcements, in the form of Erich von Falkenhayn's Yilderim Force had arrived, markedly strengthening the Turkish lines from Jerusalem to the sea.
Falkenhayn immediately began launching attacks on the advancing British, greatly slowing their speed of advance. It became apparent that Jerusalem could not be taken before one of the opposing armies had been roundly defeated - both commanders were under strict orders to avoid fighting in or around the holy city itself.
Allenby assigned the task of the assault to XX Corps under the command of Sir Philip Chetwode. Chetwodes attack began on the 8th December, 1917, and was made up of two thrusts, a central thrust from the west aimed at the Central Powers forces outside the city, and a secondary attack south at Bethlehem.
In the event Jerusalem fell in a single day, the morale of the Turkish forces being at rock bottom after months of British success and Ottoman failure. Sporadic fighting nevertheless continued for many weeks after the city's fall. Demonstrating some political finesse, Allenby made his entrance into the holy city on foot, on the 11th December.
Falkenhayn mounted a counterattack on the 26th December but was thrown back with heavy losses. The overall campaign cost 18,000 Allied and 25,000 Central Powers casualties, but the loss of Jerusalem was a critical blow to the now crumbling Ottoman Empire. News of Jerusalem's capture, which spread around Europe in January 1918, provided much welcome relief to the Allies and offset less welcome news from Russia and from the Italian Front around Caporetto.
http://www.firstworldwar.com/maps/graphics/maps_56_palestine1917_(1600).jpg