Cain, the firstborn, was a farmer, and his brother Abel was a shepherd. The brothers made sacrifices to God, each of his own produce, but God favored Abel's sacrifice instead of Cain's. Cain then murdered Abel, whereupon God punished Cain by condemning him to a life of wandering.