Japan's lower house of parliament passed a bill Friday that allows ageing Emperor Akihito to step down, as it also called for a rare debate on the role of women in the male-dominated monarchy.
Japan has not had an imperial abdication in two centuries and there was no law to deal with 83-year-old Akihito's surprise retirement request after nearly three decades on the Chrysanthemum Throne.
The popular monarch shocked the country last summer when he signalled his desire to hand the crown to his eldest son, Crown Prince Naruhito, citing age and declining health -- he has been treated for prostate cancer and had heart surgery.
The one-off bill is widely expected to become law next week after passage through the upper house.
The abdication must take place within three years of the bill becoming law or it expires -- and it only applies to Akihito.
Some scholars and politicians feared that changing the law to allow any emperor to abdicate could put Japan's future monarchs at risk of being subject to political manipulation.
Japan has had abdications in its long imperial history, but the last one was over 200 years ago and politicians had to craft legislation to make it possible because there was no provision for it in the law.
The status of the emperor is highly sensitive in Japan given its 20th century history of war waged in the name of Akihito's father Hirohito, who died in 1989.
The abdication issue has highlighted concerns over a potential succession crisis in one of the world's oldest monarchies.
A government panel in April issued a warning over the dwindling number of male heirs.
On Friday, the powerful lower house passed a non-binding resolution that called on the government to consider giving women a bigger role in the monarchy.
Female imperial family members lose their royal status upon marriage to a commoner.
The law does not apply to male royals, with Akihito and both his sons marrying commoners, and only men are allowed to become emperor, though Japan has been ruled by empresses in past centuries.
When Naruhito, who has a daughter, ascends the throne, his younger brother Akishino will be next in line, followed by Hisahito, Akishino's 10-year-old son.
But there are no more eligible males after that, meaning the centuries-old succession would be broken if Hisahito fails to have a son in the future.
News of the upcoming engagement of the emperor's granddaughter Mako, 25, to her college sweetheart has intensified a debate on whether the law should be changed so women born into the imperial family can continue in their royal roles.
That could help increase the number of potential male heirs.
Traditionalists, including Prime Minister Shinzo Abe, strenuously oppose such changes.
But the idea of female succession is popular among ordinary Japanese.
A Kyodo News agency survey last month showed 82 percent of those polled were in favour of allowing a female member of the imperial family to succeed, while 62 percent supported the creation of female imperial family branches.