Haganah was a secret organisation created in 1936. Haganah was created as a protection force for Jews who emigrated to Palestine; it's original purpose was to defend Jewish communities from attacks by Arabs. Haganah became the military arm of the Jewish Agency but it was not part of the two most famous Jewish terrorist organisations that existed at that time - the Stern Gang and Irgun Zvai Leumi - both of whose activities were condemned by Haganah.
In the Spring of 1948, the British planned to leave Palestine following a United Nations resolution to create a Jewish state. It was at this time that Haganah openly fought against Arabs. By the time of the 1948 war between the nearly founded Israel and surrounding Arab nations, Haganah had developed in to what was essentially the Israeli Army.