no Kiyomori died, leaving the Taira family in the hands of Taira no Munemori, his son and a hothead who had no knowledge of military matters. In 1182, Tokimasa's son, Yoshitoki, wed. That same year, Masako and Yoritomo had a son, Minamoto no Yoriie, Yoritomo's heir. This would also become Tokimasa's first male grandchild. The next year, Yoshitoki and his wife had their first child, a son, Hōjō Yasutoki, who would become heir to the Hōjō after Yoshitoki's death. Things were going well for the Minamoto against the Taira. In 1183, Minamoto no Yoshinaka, Yoritomo's cousin, took Kyoto before Yoritomo could. That same year, Yoshitsune and Noriyori, Yoritomo's brothers, arrived in Kamakura and joined the Gempei War on the side of Yoritomo. In 1184, Minamoto no Yoshitsune took Kyoto in the name of Yoritomo, and had Yoshinaka executed. By that time, the Taira had fled with the Emperor Antoku to Shikoku, and, in his place, the Minamoto (with the support of Cloistered Emperor Go-Shirakawa) enthroned Emperor Go-Toba, a younger brother of Antoku. In 1185, Yoshitsune defeated the Taira at the Battle of Ichi-no-Tani. Taira no Munemori and Taira no Shigehira were executed in Kyoto and Nara respectively, while the rest of the Taira, including Kiyomori's widow Taira no Tokiko and Emperor Antoku drowned at the Battle of Dannoura. Minamoto no Yoritomo was then the undisputed ruler of Japan, and the Genpei War was over with a Minamoto victory. Hōjō no Tokimasa was then in a very good position. Yoritomo did not move to Kyoto, but remained in Kamakura with Tokimasa. Tokimasa was sent to Kyoto and the court of Emperor Go-Toba and Cloistered Emperor Go-Shirakawa. He received an imperial command for Yoritomo to "hunt down" Minamoto no Yukiie and Minamoto no Yoshitsune for their rebellion. When he returned, the first appointments of shugo and jitō, the stewards and constables of the Kamakura bakufu, were apparently granted. In 1189, Yoritomo consolidated his power, executing his half brothers Yoshitsune and Noriyori. In 1192, after the birth of Yoritomo's and Masako's second son, Minamoto no Sanetomo, Minamoto no Yoritomo was granted the title of shōgun by Cloistered Emperor Go-Shirakawa, who died later that year. Tokimasa, as the head of the Hōjō clan, was thus the head of one of the most powerful families in Japan – he was the father-in-law of the shōgun. Minamoto no Yoritomo assassination attempt The Revenge of the Soga