The Japanese government has approved Emperor Akihito's abdication from the Chrysanthemum Throne in the first such case in two centuries.
The one-off bill, signed off by Prime Minister Shinzo Abe's cabinet, has sparked a possible succession crisis in the same week that his eldest granddaughter Princess Mako gave up her place in the Palace by agreeing to marry a 'commoner'.
As with all female members of the Imperial family, Mako, 25, would lose her royal status upon marriage to a commoner under a controversial law which does not apply to male 'royals'.
The 83-year-old Akihito could step down the end of December 2018 and be replaced by his son, Crown Prince Naruhito, reports have suggested.
When Naruhito, who has a daughter but no sons, ascends the throne, his younger brother Akishino will be next in line, followed by Hisahito, Akishino's 10-year-old son.
But after that there are no more eligible males, meaning the centuries-old succession would be broken if Hisahito fails to have a son in the future.
So far the monarchy has an unbroken 2,600-year-long line of male succession.
The law that stops Princess Mako remaining a royal when she marries a commoner does not apply to male royals, with Akihito and both his sons marrying commoners, who are now part of the monarchy.
Reports of Emperor Akihito's desire to retire surprised Japan when they emerged last July.
In August he publicly cited age and declining health, which was interpreted as his wish to hand the crown to his eldest son.
But current Japanese law has no provision for abdication, thus requiring politicians to craft legislation to make it possible.
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.
Revered as a demigod before and during the conflict, Hirohito was reduced to a mere figurehead as part of postwar reforms.
Akihito has won plaudits for seizing upon the constitutionally-prescribed role of national symbol and there is wide sympathy for his wish to retire.
He has been treated for prostate cancer and also had heart surgery. And though he has cut back on some of his duties, he still maintains a busy official schedule, including occasional overseas visits.
Princess Mako, the granddaughter of Japan's emperor, is getting married to ocean lover Kei Komuro who can ski, play the violin and cook.
The man who won the princess' heart, was a fellow student at International Christian University in Tokyo, where Princess Mako, 25, also graduated.
Once they say 'I do', she will lose her status - despite being Emperor Akihito's granddaughter - as Japanese tradition dictates and become a commoner.
They met at a restaurant in Tokyo's Shibuya about five years ago at a party to talk about studying abroad, and have been seeing more of each other in recent months.
Komuro has worked as 'Prince of the Sea' to promote tourism to the beaches of Shonan in Kanagawa prefecture, a report on public broadcaster NHK said.
While a majority of the Japanese public supports a permanent law on abdication, they have also expressed support for the current bill to help enable Akihito's smooth transition from the throne.
While abdications are far from unknown in Japanese history, the last one was in 1817.
Princess Mako's engagement to her college sweetheart, a commoner, highlighted the male-dominated nature of Japan's monarchy as it faces a potential succession crisis.
Public broadcaster NHK broke the story of Princess Mako's engagement, sending the country into a frenzy with the news dominating television chat shows and newspaper coverage ahead of an expected official announcement in coming weeks.
Her reported fiancé, Kei Komuro, a telegenic 25-year-old commoner once named 'Prince of the Sea' in a tourism promotion contest, briefly met journalists on Wednesday, but dodged questions on the engagement, saying he would only speak about it 'when the time comes'.
The national rejoicing, however, has been tempered by concerns over the future of the royal family as the country prepares for its first imperial abdication in two centuries amid an acute shortage of male heirs.
Akihito's only daughter Princess Sayako also left the palace in 2005 when she married city planner Yoshiki Kuroda, though the departure was sweetened with a more than $1 million payout from the government.
The news of the engagement 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 to a monarchy that does not allow females to ascend the Chrysanthemum Throne.
Traditionalists, including Prime Minister Shinzo Abe, strenuously oppose such changes, even though Japan has occasionally been ruled by female sovereigns in past centuries.