The Genpei War was a multiyear struggle for supremacy in medieval Japan. The victor brought into being the Kamakura shogunate.
By the 12th Century, emperors had been ruling Japan for some time. However, the various emperors also had to contend with powerful families. Two at the very top of the hierarchy at that time were the Minamoto and Taira. The families clashed in a pair of high-profile struggles, in 1156 and 1560 (called, respectively, the Hogen Disturbance and the Heiji Disturbance), and both times the Taira emerged victorious. In the Hogen Disturbance, the death of the retired emperor Toba left a power void and the Minamoto and Taira went head-to-head in claiming ascendancy. The head of the Minamoto at that time was Tameyoshi, who favored Sutoku to take the throne; leading the Taira and backing Go-Shirakawa for the throne was Tadamichi. The Taira side won that first struggle and the next, dispatching the rival Minamoto leader Yoshitomo, who had seized the throne while the emperor was away.
Taira no Kiyomori emerged as Minister of State and secured his 2-year-old grandson as next line to the imperial throne. And in 1180, Antoku became Emperor of Japan. That, coupled with a failed attempt to move the capital from Kyoto to Kobe, was too much for the Minamoto, and they rebelled.
The Minamoto had their own claimant to the imperial throne, in the person of Prince Mochihito. He and his father, Yoritomo, gathered a large number of faithful and made known their desire for war as a means to achieve their imperial ends. The Minamoto had gained what they thought were powerful allies in a cadre of warrior monks from Nara. This alliance came in handy when Prince Mochihito fled in the face of an arrest warrant and, just ahead of a large Taira force, took refuge in the monastery of Byodo-in, awaiting reinforcements in the form of the Nara warrior monks.
Mochihito had a fair number of supporters with him, and they were more than capable of meeting the Taira attackers when they reached the Byodo-in monastery. On June 20, 1180, the battle ensued even though a thick fog obscured the field of fighting. The defenders had the advantage of being behind a moat and had torn up the only bridge across the surrounding river. Nonetheless, enough Taira fighters forded the river to make it a fierce battle and the tide turned against the Minamoto. Prince Mochihito fled but was not able to escape; Taira forces killed him on the battlefield. The Nara monks, yet to arrive, got word of the execution of the prince and abandoned their forced march. The Minamoto forces were in tatters, and Minamoto Yorimasa accepted responsibility and committed one of the first recorded seppuku. Pressing their advantage, Taira faithful razed the monasteries of the warriors who had supported the Minamoto, killing thousands in the process.
In this desperate hour, the new Minamoto leader was Yoritomo, who was a hostage to a family aligned with his enemy the Taira. He organized an escape and made it to friendly territory, where he built up a force to press his claim. This drive was successful twice, once in the building up of a new fighting force and twice in that this new force of fighters defeated a Taira army at Fujigawa on November 9, 1180.
Not for the first time, natural disasters struck. A typhoon, a plague, an earthquake, and a series of droughts and floods decimated crops and lands across Japan, and this created a lull in the fighting, as both sides dealt with disease and sickness. It was a year and a half before conflict resumed. By that time, the Minamoto side had a new leader, Yoritomo's cousin Yoshinaka. This Minamoto proved an adept leader, both on and off the battlefield, and his number of victories grew. A worried Yoritomo feared being usurped and sent his own troops to confront his cousin's, in early 1183, but the two men worked out an arrangement and didn't come to blows. Instead, they united against the Taira, who were again on the march. Yoshinaka proved his brilliance by luring a Taira force into a trap at the Battle of Kurikara. It was a crushing defeat for the Taira, and their forces fled Kyoto, fearing the worst. On August 17, 1183, Minamoto loyalists claimed the capital, bringing with them a former emperor, Go-Shirakawa.
The head of that victorious Minamoto force was Yoshinaka. His cousin, Yoritomo, still had the better claim to the imperial throne, but he wasn't in Kyoto, at the head of a victorious army. Yoshinaka misspent his welcome, however, after letting his troops plunder the capital, and found himself the target of another cousin's rage. Yoritomo's younger brother Yoshitsune led a large force into the capital, restored order, and kept the peace, executing Yoshinaka in the process.
The Miramoto had seized Kyoto, but the Taira were not entirely defeated. That development came when the Minamoto were victorious at the Battle of Dan-no-ura, on March 24, 1185. It was a naval battle, fought on the Taira home turf, as it were, in the Straits of Shimonoseki, which separated Honshu and Kyushu. Minamoto Yoshitsune had a larger naval force and brought that to bear, ending things with a flurry of hand-to-hand combat after the ships closed ranks. Losing his life that day was Emperor Anotku, then only 7 years old; he jumped into the sea to avoid capture. Also ending his own life was the Taira leader, Tomomori.
Despite being the victorious leader, Yoshitsune gave way to Yoritomo, who formed the first bakufu and was Japan's first shogun, in 1192. Yoritomo ruled from his capital, Kamakura, and thus began the Kamakura shogunate. The emperor's power would never be the same.