Japan's parliament on Friday enacted a law to allow 83-year-old Emperor Akihito to pass the throne to his elder son Crown Prince Naruhito in what would be Japan's first abdication in two centuries.

The enactment of the law came 10 months after the emperor hinted in a televised address to the nation that he wanted to retire, a step not legally possible at that time. The new legislation allows abdication only for the present emperor and does not solve the issue of a shortage of male heirs and the falling number of imperial family members.

Instead, parliament has adopted a nonbinding resolution requesting the government to consider, promptly after the legislation comes into effect, how to ensure a stable imperial succession by such means as allowing princesses to establish their own branches within the imperial family after they marry.

But the resolution stopped short of specifying a deadline for the government to report the outcome of the debate to the Diet.

Females cannot ascend to the throne and must leave the imperial family when they marry commoners, according to the 1947 Imperial House Law, which stipulates imperial matters.

As Princess Mako, 25, the eldest grandchild of Emperor Akihito, is expected to become engaged to a commoner later this year, the number of imperial family members will drop to 18 upon her marriage. Her younger brother Prince Hisahito, 10, is the only male of his generation in the imperial family, leaving the long-term succession far from assured.

Until now, only posthumous succession had been allowed as the Imperial House Law lacks a provision on abdication.

With the enactment of the law, Emperor Akihito, who has reigned since 1989, is set to step down within three years of the law's promulgation.

Prime Minister Shinzo Abe told reporters after the enactment that the process to legalize the first abdication in modern Japan reminded him of the "significance" of the imperial matter pertaining to "fundamentals of the nation, its long history and future."

"A stable succession of the imperial throne is a momentous issue. The government will advance debate with respect for the resolution," he said.

The government is looking at December 2018, when the emperor turns 85, as a possible time for the abdication and the start of a new Japanese era -- which is based on an emperor's reign -- at the beginning of 2019.

In the rare video message released to the public last August, Emperor Akihito cited concerns that his age and declining health may one day stop him from fulfilling his duties. He underwent heart bypass surgery in 2012 and was earlier treated for prostate cancer.

His words were widely interpreted as indicating his desire to relinquish the throne and the government entrusted an advisory panel to study the abdication issue the following month.

Although public polls showed that a majority of Japanese support creating a permanent abdication system, the government crafted the one-off law applicable only to Emperor Akihito, saying it could set a precedent for abdications by future emperors.

The House of Councillors passed Friday the legislation to permit the first abdication since 1817 in a unanimous vote with a handful of lawmakers abstaining after it cleared the more powerful House of Representatives last week.

Historically, it has been common for Japanese emperors to abdicate, with about half of the supposedly 124 former emperors doing so. But abdication became impossible under the previous imperial house law set in 1889, reflecting concern that the coexistence of reigning and retired emperors could cause conflict.

The legislation approved Friday states that the public's "understanding" and "sympathy" for the aging emperor's "deep concern" about becoming unable to fulfill his duties as a reason to realize his abdication, in a bid to clarify that he is not being forced to retire.

After Emperor Akihito relinquishes the throne, he will be called "joko," a title given in the past to an emperor that has abdicated, and Empress Michiko will get the new title of "jokogo," which means wife of joko, according to the legislation.

The joko will not be entitled to ascend the throne again or become a regent.

Emperor Akihito's funeral ceremony and tomb will be equivalent in status to those of past emperors, the legislation said, adding that the public holiday to mark the emperor's birthday, currently observed on Dec. 23, will be moved to Feb. 23, the birthday of the crown prince.

The 57-year-old crown prince's younger brother Prince Akishino, 51, will be next in line to the throne after the abdication. Accordingly, the annual budget for Prince Akishino's private expenses will increase threefold to 91.5 million yen ($833,000).

Imperial Household Agency chief Shinichiro Yamamoto said in a statement that the agency will do its utmost to ensure a smooth succession by closely cooperating with other institutions concerned.

Emperor Akihito ascended to the throne after the death in 1989 of his father Hirohito, posthumously known as Emperor Showa, becoming the first emperor to do so under the postwar Constitution.

Once considered divine, the emperor is defined in the Constitution as "the symbol of the state" with no political power.

While on the throne, Emperor Akihito has often traveled with Empress Michiko, 82, to areas hit by natural disasters. Images of the informally dressed couple kneeling down to talk with survivors at evacuation centers were said to have helped bring the secluded imperial family closer to the public.

The couple also traveled to former World War II battlefields overseas, as part of their efforts to pay tribute to those who lost their lives during the war, which Japan fought in the name of Emperor Akihito's father.