The Minamoto clan was a prominent clan in the Heian period, and the clan from which all shogun have claimed descent. Defeating the Taira clan in the Genpei War (1180-1185) and uniting Japan, the Minamoto established the first shogunate, marking the rise of the samurai class and the beginning of a period of over 600 years during which Japan would be under samurai (warrior) rule.
During the days of Japan's feudal era, the ancestors of the Minamoto clan were plagued and plundered by oni and other monstrous creatures. The ancestors of this clan made a pact with the shinto creator god Izanagi and vowed to remove all traces of evil from the land. In doing so, Izanagi promised to bless a thousand generations with the will and power to combat all evil which threatened their lands. And from that day forth, the Minamoto clan was born and became legendary throughout Japan.
Along with the Fujiwara, Tachibana, and Taira clans, the Minamoto were one of four clans which dominated Heian politics and court society. Originally an honorary surname granted by the emperor, the Minamoto originally served as agents of the court, suppressing rebellions and guarding the state's borders. Different lineages of Minamoto claimed descent from several different emperors; the most prominent Minamoto line was the Seiwa Genji, who traced their ancestry back to Emperor Seiwa, while other prominent lines included the Kawachi Genji and Yamato Genji.
In the 12th and 13th centuries, struggles for power emerged in the Imperial Court with the Minamoto clan and the Taira clan being fierce rivals. The two clans faced off three years later, in the 1159 Heiji Disturbance, which ended in a Taira victory. Several of Yoshitomo's sons were killed, and several exiled, Yoshitomo himself being killed shortly later. Kiyomori came to dominate the Imperial court, establishing the first informal samurai-dominated government. Twenty years passed, as the Minamoto, scattered and defeated, gradually regained strength and unity.