To-ji Temple ( 東寺) was built in 796, shortly after the new capital of Kyoto was established. To-ji, means East Temple. It’s role was to protect the capital, along with Sai-ji, the West Temple, which no longer exists. The two temples sat on opposite ends of the gate to the capital.