Yasumasa Hirai (平井保昌) is a fictional character from the historical fantasy novel Teito Monogatari by Hiroshi Aramata. He also appears in the prequel novel Teito Gendan
Hirai is the direct descendant of Abe no Seimei and a master Onmyoji. He leads the Tsuchimikado Clan, one of the last royal families of Japan that practiced Onmyōdō. He also serves as a spiritual adviser to the Emperor in Kyoto.
In classic depictions of Abe no Seimei in art and literature, Seimei is usually portrayed as a wise, crafty elderly gentleman with powerful supernatural abilities. Hirai, being Seimei's descendants, is modeled off this image. Furthermore, his actions in the story are modeled off the actions of Seimei in classic stories from the Uji Shui Monogatari.[1] This is one of the last notable instances in Japanese pop culture of the "wise old sorcerer" image being used for Seimei or his descendants as the overwhelming success of Baku Yumemakura's Onmyoji series would result in them usually being illustrated as bishonen in future depictions.[2]
In the first cinematic adaptation of Teito Monogatari, Hirai was played by veteran actor Mikijiro Hira. In the animated Teito Monogatari, he was voiced by Goro Naya. The character also appears in Kamui Fujiwara's manga adaptation of Teito Monogatari (Babylon Tokyo).