The Japanese parliament on Friday passed a bill to allow Emperor Akihito to abdicate, the first emperor to do so in 200 years.
The bill became a law after members of the approval of the Upper House earlier on Friday. It had already passed the Lower House last week, reports public broadcaster NHK.
The law will allow the 83-year-old Emperor to hand over the Chrysanthemum Throne to his 57-year old son, Crown Prince Naruhito.
The government will carefully determine the timing of the abdication.
According to the law, it will happen within three years.
Akihito, who has had heart surgery and was treated for prostate cancer, has been on the throne since the death of his father, Hirohito, in 1989, reports the BBC.
In a rare address to the nation last year, he said he was beginning to feel "constraints" on his health which were making it hard for him to fulfil his official duties.
The Emperor is constitutionally barred from making any political statements, so he could not say explicitly that he wanted to stand down as that would be considered comment on the law.