A religion related to Judaism in that it accepts the Torah as its holy book. They consider the rest of Jewish history after the Torah as having been led astray while they themselves stayed to the true religion. Their temple was at Mount Gerizim, not Jerusalem. There are very few followers today, about 500 living near Mt. Gerizim.
When Babylonian Empire conquered ancient Israel, it deported the middle and upper classes of the Jews to Babylonia, replacing them with settlers from other parts of the Babylonian Empire. The lower classes and the settlers intermarried and merged into one community. Decades later, the descendants of those Jews exiled in Babylon were permitted to return, and many did. The Jews who had returned to Israel refused to recognize the descendants of the lower class Jews who had remained as Jews, due to their intermarriage and merger with pagan settlers, even though they largely followed the same religion. Thereafter these descendants became the Samaritans.