Japan begins a new era today with the ascension of a new emperor, but archaic rules mean the world's oldest continuous monarchy could one day "perish".
Crown Prince Naruhito today becomes the 126th emperor of Japan after his father Akihito decided to step down due to his advanced age.
In a solemn ceremony inside the Imperial Palace's Matsu no Ma — or Hall of Pine — the outgoing Emperor thanked the people for supporting him in his role as the symbol of the state.
"Since ascending the throne 30 years ago, I have performed my duties as the emperor with a deep sense of trust in and respect for the people, and I consider myself most fortunate to have been able to do so," Akihito said.
"I sincerely wish, together with the empress, that the Reiwa Era, which begins tomorrow, will be a stable and fruitful one, and I pray, with all my heart, for peace and happiness for all the people in Japan and around the world."
The ceremony was watched by about 300 people, including incoming Emperor Naruhito and his wife Masako, as well as Japanese Prime Minister Shinzo Abe.
"While keeping in our hearts the path that the emperor has walked, we will make utmost efforts to create a bright future for a proud Japan that is full of peace and hope," Mr Abe said ahead of the emperor's remarks.
Women are banned from sitting on the Chrysanthemum Throne, so Naruhito's only daughter, Princess Aiko, is not allowed to succeed him.
Instead, the next emperor will have to come from a shrinking group of male heirs: Naruhito's 83-year-old uncle Masahito, his 53-year-old brother Fumihito, and Fumihito's 12-year-old son, Hisahito.
A law allowing only male heirs to reign was made at a time when there were many imperial family members, according to Yuji Otabe, a professor of Japanese history at Shizuoka University of Welfare.
"[The law] was made in the old times, so the idea is based on men's predominance of women," he said.
"In the old days, they had a concubine system and it allowed several women to bear children. Now it's a monogamy, so the empress has a child and she also carries out her duties," he said.
After Japan was defeated in World War II, extended members of the imperial family were stripped of their titles.
With Akihito's abdication, there are 16 imperial family members who can perform official duties and 13 of them are women.
But the number of royal women in Japan also continues to dwindle.
Royal women forced to give up titles for love
Unlike royal men, Japanese princesses who marry commoners lose their titles under the 1947 Imperial Household Law.
Princess Ayako gave up her role last year to marry a man who works for a shipping company.
She followed in the footsteps of her big sister Noriko in 2014, who relinquished her title to marry the son of a Shinto priest.
Their cousin Princess Mako is set to marry out of the family in the next few years — though the wedding was postponed due to the couple's "immaturity".
The three royal women had no option but to pursue relationships with commoners.
There are no male suitors of noble stock left.
The Imperial Household Law was changed to enable Emperor Akihito's abdication, but allowing females to accede to the throne was ultimately deferred.
"The [ruling Liberal Democratic party] almost made a decision to allow a female emperor, but there was opposition and some strong voices that say it must be a male," Professor Otabe said.
Unless the law is changed, the future of Japan's royal family will rest on the shoulders of 12-year-old Crown Prince Hisahito.
"Heredity is the fundamental principle to become an Emperor so if Prince Hisahito doesn't have a son, the hereditary system will fade away and the whole Emperor system will perish.
"There will be no more symbolic emperor too. In that case, Japan will have to introduce a new political system."
Meet Japan's new emperor and his empress
For Crown Prince Naruhito and Crown Princess Masako, it has been a long road to becoming emperor and empress.
Naruhito is known as an earnest, studious man who wooed and won his wife with a pledge to protect her.
The 59-year-old will be the first Japanese emperor born after World War II and the first to be raised solely by his parents.
He is also the first to graduate from university, and to pursue advanced studies overseas.
Naruhito defied palace officials to marry Masako after she caught his eye at a concert, prompting a years-long courtship during which she rejected his early proposals.
After struggling to conceive and experiencing a miscarriage, the Harvard-educated Masako finally gave birth to her daughter Aiko in 2001.
The former diplomat who speaks five languages then largely disappeared from public view for nearly a decade.
It was the start of a long struggle with what palace officials termed an "adjustment disorder" brought on by the strains of palace life and pressure to bear a male heir.
In 2004, Naruhito shocked the nation with his passionate defence of his wife, saying she had "totally exhausted herself" trying to adjust and that there had been moves to "negate her career and her personality".
His blunt remarks drew a rebuke from his younger brother and sorrowful remarks from the emperor.
"I was very surprised as it was the first time for me also to hear it," Emperor Akihito wrote at the time.
"It is regrettable if our respect for the independence of the crown prince and crown princess, who maintain their own independent household, has proved to be the cause of our failure to notice these various problems."
Crown Princess Masako faced huge expectations to deliver a male heir and Professor Otabe said she struggled mentally after giving birth to Aiko.
"She didn't marry into the imperial family just to have a baby, but it was considered as the top issue. So there was pressure to make a baby rather than performing her official duties," he said.
"I think she struggled a lot in this world with her independent mind and the issue of bearing a child."
However, in recent years she has returned to public life.
Professor Otabe said Masako appears to have become used to the demands of being a member of the imperial family.
"She's originally a diplomat so we have expectations [as Empress] that she will have an active role internationally," Professor Otabe said.