His birth year is uncertain, estimated around the 630s. Known as Prince Oama, he was the younger brother of Emperor Tenji (by some accounts). When Tenji died in 671, a succession dispute arose between Oama and Tenji's son Prince Otomo (Emperor Kobun). In 672 Oama raised his banner from the mountains of Yoshino and in just over a month of fighting in the Jinshin War overwhelmingly defeated Otomo's forces. He ascended the throne in 673 at the Asuka Kiyomihara Palace as Emperor Tenmu. He then undertook the absolute strengthening of imperial authority: establishing the Yakusa no Kabane system to rank imperial family members and aristocrats, ordering the compilation of the Asuka Kiyomihara Code, and advancing the foundations of the ritsuryo state. He also ordered the compilation of the Kojiki and Nihon Shoki, promoting the creation of Japan's national historical texts. The prototype of the Shikinen Sengu renewal system of Ise Grand Shrine is also said to have originated in this era. He died in Asuka in 686. His consort, Empress Jito, carried on his intentions, paving the way for the construction of Fujiwara-kyo and the promulgation of the Taiho Code.