In 1156, factional divisions in the court erupted into open warfare within the capital itself. The cloistered Emperor Toba and his son Emperor Go-Shirakawa sided with the son of Fujiwara regent Fujiwara no Tadazane, Fujiwara no Tadamichi as well as Taira no Kiyomori (a member of the Taira clan), while Cloistered Emperor Sutoku sided with Tadazane's younger son, Fujiwara no Yorinaga. This was known as the Hōgen Rebellion, or the 'Hogen Disturbance'.
Unfortunately the Seiwa Genji were split. The head of the clan, Tameyoshi, sided with Cloistered Emperor Sutoku while his son, Yoshitomo, sided with Cloistered Emperor Toba and Emperor Go-Shirakawa, as well as Kiyomori. In the end, the supporters of Emperor Go-Shirakawa won the civil war, thus ensuring victory for Yoshitomo and Kiyomori. Cloistered Emperor Sutoku was placed under house arrest, and Yorinaga was fatally wounded in battle. Even Tameyoshi was executed as well, even after numerous pleas from Yoshitomo. Nonetheless, Emperor Go-Shirakawa and Kiyomori were ruthless, and Yoshitomo found himself as the head of the Minamoto, while Yoritomo became the heir.
Since Yoritomo was descended from the imperial family on his father's side and the Fujiwara noble family on his mother's side, he received his first court title and was appointed an administrator. Nonetheless, in Kyoto, the Taira clan, now under the leadership of Kiyomori, and the Minamoto clan, under the leadership of Yoshitomo, began to factionalize again.
Kiyomori supported the Emperor Nijō, who was the son of Go-Shirakawa. Kiyomori had the support of Fujiwara no Nobuyori. Meanwhile, Yoshitomo supported the now cloistered Emperor Go-Shirakawa and their old ally Fujiwara no Tadamichi and the scholar-courtier Fujiwara no Michinori. This was known as the Heiji Rebellion, or the 'Heiji Disturbance'. Nonetheless, the Minamoto were not well prepared, and the Taira took control of Kyoto.
In the aftermath, harsh terms were imposed on the Minamoto and their allies. Fujiwara no Michinari and Fujiwara no Tadamichi were executed, while the palace of Cloistered Emperor Go-Shirakawa was burned down by the Taira. Meanwhile, Yoshitomo fled the capital just as the Taira marched in 1160, but was betrayed and executed by a retainer in Owari. As for Yoritomo, the new head of the Minamoto, he was exiled to Hirugashima, an island in Izu province, which at that time was under the rule of the Hōjō clan. Kiyomori and the Taira clan were now the undisputed leaders of Japan. Yoritomo was not executed by Kiyomori because of pleas from Kiyomori's stepmother Lady Ikenozenni. Yoritomo's half brother, Minamoto no Noriyori, was also exiled, while Minamoto no Yoshitsune, another half-brother, was forced to enter a monastery. All other siblings were executed.
Yoritomo grew up with a life in exile. In 1179, he married into the Hōjō clan, led by Hōjō Tokimasa. He married Tokimasa's daughter, Hōjō Masako. Meanwhile, he was notified of events in Kyoto thanks to helpful friends. Soon enough, Yoritomo's passive exile was to be over.
In 1180, Prince Mochihito, a son of Cloistered Emperor Go-Shirakawa, humiliated by the Taira because of the Taira-backed accession of the throne of his nephew, Emperor Antoku (who was half Taira himself) made a national call to arms of the Minamoto clan all over Japan to rebel against the Taira. Yoritomo decided to take part in this, especially after things escalated between the Taira and Minamoto after the death of Minamoto no Yorimasa and Prince Mochihito himself. Yoritomo set himself up as the rightful heir of the Minamoto clan, and, with financial backing of the Hōjō, his wife's family, he set up a capital at Kamakura in the east. Not all Minamoto thought of Yoritomo as rightful heir. His uncle, Minamoto no Yukiie, and his cousin Minamoto no Yoshinaka conspired against him.
In 1181, Taira no Kiyomori died, and the Taira clan was now led by Taira no Munemori. Munemori took a much more aggressive policy against the Minamoto, and attacked Minamoto bases from Kyoto. Nonetheless, Yoritomo was well protected in Kamakura. His half-brothers, Minamoto no Yoshitsune and Minamoto no Noriyori defeated the Taira in several key battles, but they could not stop Minamoto no Yoshinaka, Yoritomo's rival, from entering Kyoto in 1183 and chasing the Taira south. They took Emperor Antoku with them, so when the Minamoto entered the capital, they enthroned the half-brother of Antoku, Emperor Go-Toba, as the new emperor.
In 1180, Yoritomo was defeated at Ishibashiyama, his first major battle; but his early years as an insurgent chief were mostly spent in consolidating his power over the warrior aristocrats in the Kantō area, most of whom accepted his authority peaceably. From 1181 to 1184, a de facto truce with the Taira dominated court allowed Yoritomo the time to build an administration of his own, centered on his military headquarters in Kamakura. In the end he triumphed over his rival cousins, who sought to steal from him control of the clan, and over the Taira, who suffered a terrible defeat at the Battle of Dan-no-ura in 1185. Yoritomo thus established the supremacy of the warrior samurai caste and the first bakufu (shogunate) at Kamakura, beginning the feudal age in Japan which lasted until the mid-19th century.