The 108 Heroes are the main characters of the Ming dynasty classic Chinese novel the Water Margin, which was written in the 14th century and usually attributed to Shi Nai'an. The heroes are divided into the 36 Heavenly Spirits and 72 Earthly Fiends, groups that are based on a belief in Daoism that Ursa Major has 36 Heavenly stars and 72 Earthly stars. The 108 Heroes represent 108 demonic generals who were banished by Shangdi, a supreme god in Chinese folk religion. Having repented since their banishment, the stars are released from imprisonment by accident, and are reborn in the world as 108 heroes who band together for the cause of justice. The bulk of the novel describes the lives of these men and women and how they came to come together in Mount Liang to rebel against the evil forces controlling the court of the Song dynasty.