After the withdrawal from Gallipoli the Australians returned to Egypt and the AIF underwent a major expansion. In 1916, the infantry began to move to France while the mounted infantry units remained in the Middle East to fight the Turks. Australian troops of the ANZAC Mounted Division and the Australian Mounted Division saw action in all the major battles of the Sinai and Palestine Campaign, playing a pivotal role in fighting the Turkish troops that were threatening British control of Egypt. The Australians first saw combat during the Senussi Uprising in the Libyan Desert and the Nile Valley, during which the combined British forces successfully put down the primitive pro-Turkish Islamic sect with heavy casualties. The ANZAC Mounted Division subsequently saw considerable action in the Battle of Romani between 3 and 5 August 1916 against the Turks who were eventually pushed back. Following this victory the British forces went on the offensive in the Sinai, although the pace of the advance was governed by the speed by which the railway and water pipeline could be constructed from the Suez Canal. Rafa was captured on 9 January 1917, while the last of the small Turkish garrisons in the Sinai were eliminated in February.