The bill went through the upper house of parliament unopposed clearing the way for the first abdication by a Japanese monarch in nearly two centuries.
Japan's parliament on Friday passed a law allowing Emperor Akihito to abdicate, clearing the way for the first abdication by a Japanese monarch in nearly two centuries and the accession of his son, Crown Prince Naruhito, probably late next year.
Akihito, 83, who has had heart surgery and treatment for prostate cancer, said in rare public remarks last year he feared age might make it hard for him to continue to fulfil his duties.
In a vote televised live on NHK public television, the upper house of Parliament passed the bill with a handful of lawmakers sitting out the vote. It cleared the more powerful lower house last week.
"Abdication will take place for the first time in 200 years, reminding me once again of how important an issue this is for the foundation of our nation, its long history, and its future," Prime Minister Shinzo Abe told reporters after the vote.
Now the government has to hammer out the details of the abdication, including the timing, but media reports have said it is likely to take place at the end of 2018, which would mark three decades on the Chrysanthemum throne for Akihito.
The abdication, the first since 1817, appears to have support among the general population, who view it as a sign of changing times.
"In essence, the emperor is resigning, which I feel was an issue of personal thought," said Masayoshi Matsumoto, a 47-year-old animator.
The government also has to ensure the continuity of a monarchy beset by a shortage of male heirs and shrinking pool of imperial family members.
Women are not allowed to inherit the throne and leave the family upon marriage, an issue highlighted last month with the announcement that the Emperor's eldest granddaughter will marry a commoner.
The law, which applies only to Akihito and not to future emperors, included a resolution to debate letting female royals stay in the imperial family after marriage but did not touch on the controversial topic of allowing women to inherit.
"I believe we will look into all these issues rather broadly," said Koichi Hagiuda, deputy chief cabinet secretary, at a news conference.
Though some conservatives oppose the idea of an empress, many think the monarchy should also move with the times on this.
"After all, the emperor is a symbol, it's not as if they really have power. They're a representative of the Japanese people and man or woman shouldn't matter," said Yukinori Kumakiri, a 61-year-old man working for an electrical company.