Founded in 1930 as the merger of two socialist parties, the Ahdut Haavoda and Hapoel Hatzair. It aimed at the establishment of a Jewish state in Palestine. This would be an agricultural and industrial society in which social justice and equality would be realized. Closely linked to the Histadrut, it quickly became the official representative of the Jewish community in Palestine, commanding the majority both in the self-governing national council, and in the Jewish Agency. As such, it provided many of Israel's leaders up to and after independence, most notably Ben-Zvi, Ben-Gurion, Eshkol, and Meir.
From 1948, Mapai became the most important political party in Israel, continuously providing the Prime Minister. It was weakened in 1963 by the defection of Ben-Gurion in protest against the party establishment's protection of Pinhas Lavon, who was forced to resign over misuse of power only to become secretary-general of the party. Ben-Gurion founded the Rafi party in 1965, which only gained ten seats in the elections of that year. However, Rafi attracted prominent members of the Labour movement, such as Teddy Kollek, mayor of Jerusalem (1965–93), Dayan, and Peres. Meanwhile, Mapai joined forces with a smaller socialist movement, Ahdut Haavoda-Poalei Zion (est. 1946) to form the Alignment in 1965. Its subsequent government was joined in 1967 by Dayan, in order to overcome the challenge of the Six Day War. In 1968, this led to the eventual unification of most of Rafi with the Alignment to form the Labour Party.