Empress Kōken (born Abe, known as Empress Shōtoku during her second reign; 718–770) was the 46th and 48th monarch of Japan according to the traditional order of succession. She was born to Crown Prince Obito (the future Emperor Shōmu) and his consort Fujiwara Asukabehime; seeking to protect the bloodline of Prince Kusakabe, her father proclaimed her the first crown princess in Japanese history in 738. She became the Empress Regnant in 749, after her father retired to become a Buddhist monk. With the backing of her mother (now Dowager Empress Kōmyō) and her mother's nephew Fujiwara no Nakamaro, she was able to outmaneuver a largely hostile Daijō-kan (Council of State). Her father died in 756, having named a cousin unrelated to the Fujiwara as her heir; this outraged Fujiwara supporters, and Kōken replaced him with Prince Ōi, a close ally of her mother and Nakamaro. In 757, she headed off a conspiracy to overthrow her by Tachibana no Naramaro, and resigned the following year to serve as empress emerita (Daijō Tennō), while Ōi reigned as Emperor Junnin.
Nakamaro slowly consolidated his political power with the backing of dowager empress Kōmyō. After an illness, Kōken became close to a healer-monk named Dōkyō, who became one of her strongest allies, as well as potentially an intimate partner. After this, she became a bhikkhunī (Buddhist nun) and shaved her head. After her mother's death in 760, Kōken began to oppose Nakamaro. She proclaimed superiority over Emperor Junnin in state matters in 762, and allied with anti-Nakamaro leaders, including her childhood tutor Kibi no Makibi. In 764, political conflict grew violent after she attempted to take control of the royal seals; Nakamaro fought a brief rebellion against her, naming Prince Shioyaki as emperor, but both were captured and executed, and Kōken returned to the throne as Empress Shōtoku.