聖武天皇
The ritsuryō code allowed retired emperors to exert some limited powers, and there are early examples such as Empress Jitō, Emperor Shōmu and Emperor Uda in the 7th, 8th and 9th centuries respectively.