Formed out of previous existing militias, its original purpose was to defend Jewish settlements from Arab attacks, such as the riots of 1920, 1921, 1929 and during the 1936–1939 Arab revolt in Palestine. It was under the control of the Jewish Agency, the official governmental body in charge of Palestine's Jewish community during the British Mandate. Until the end of the Second World War, Haganah's activities were moderate, in accordance with the policy of havlaga ("self-restraint"), which caused the splitting of the more radical Irgun and Lehi. The group received clandestine military support from Poland. Haganah sought cooperation with the British in the event of an Axis invasion of Palestine through North Africa, prompting the creation of the Palmach task force in 1941.