Japanese people across the country on Tuesday recalled the past three decades of Emperor Akihito's reign and expressed hopes for the new era starting the next day.

Crowds visited the Imperial Palace from the morning as rain fell on Tokyo and across many parts of Japan.

"I wanted to see the Imperial Palace on the last day of Heisei," said Kiwako Toma, 44, who came from Okinawa, Japan's southernmost island prefecture, with her 9-year-old son.

Okinawa was one of the bloodiest battlefields of World War II, a war Japan fought in the name of Emperor Akihito's father, Emperor Hirohito.

"I came here with gratitude, as I was touched by His Majesty's attitude not to forget Okinawa and to keep on caring about the people there," Toma said. The emperor visited the prefecture a total of 11 times, including trips made when he was a crown prince.

Umbrellas in hand, many visitors took commemorative photos with cameras and smartphones in front of the Nijubashi Bridge as police officers patrolled the area around the palace.

Miho Einaga, 53, from the western Japanese prefecture of Hyogo, said she was affected by the 1995 Great Hanshin Earthquake that hit Kobe and its vicinity, and also lost relatives in the massive earthquake and tsunami that devastated northeastern Japan in 2011.

"There were a series of natural disasters but I feel that the emperor has always cared for us," she said.

Gu Jie, 31, who was guiding a group of tourists from Shanghai, said "I hope in the next era China and Japan will become closer friends."

At 5 p.m., the 85-year-old emperor gave a final farewell to the public in a ceremony at the palace before his elder son, Crown Prince Naruhito, 59, accedes to the throne on Wednesday.

As a precaution to avoid overcrowding, access to the plaza in front of the palace was restricted from 6 p.m. Tuesday and several dozen tourists were asked to leave. The regulation will continue until Wednesday morning.

Heisei "is really coming to an end," said Akio Fumibuchi, 71, in Osaka as he reflected on the era. He was another affected by a natural disaster, describing how the roof of his house had been blown away in a powerful typhoon last year.

"I hope there'll be no big disasters (in the coming era). And we shouldn't wage war," he added, wishing for the peaceful times under Heisei to continue.

In Sendai, northeastern Japan, Yuka Hoshi, 32, recalled seeing the imperial couple visit areas devastated by the 2011 earthquake. "My husband's grandmother was nearly in tears," she said. "I was moved, too."

In Sapporo, the capital of Japan's northernmost main island of Hokkaido, Yoshie Goto, 51, described the Heisei Era as "tumultuous" as her employer Yamaichi Securities Co. went out of business in 1997. "I want my (23-year-old) son to have the strength to survive the hard times" that might come his way one day, she said.

"The imperial couple were a symbol of 30 years of peace," said Hiroshi Hisama, 56, in Fukuoka, southwestern Japan. He expressed the wish that Crown Prince Naruhito will also become an emperor beloved of the people.

In Nagoya, central Japan, a 25-year-old company worker who identifies as a member of a sexual minority, said the Heisei Era was one in which "people became tolerant of diversity."

In Tokyo's bustling Shibuya shopping and entertainment district, police are on the alert for possible rowdy behavior as the area's famous scramble crossing may become a meeting point for young people celebrating the start of the new era at midnight.

Groups opposed to the nation's imperial system also took to the streets.

A group of around 150 people gathered near Tokyo's Shinjuku Station and called for abolishing the system, arguing that having an emperor goes against the legal equality guaranteed under the Constitution.

Some right-wing activists tried to interrupt the rally, with riot police mobilized to block them from approaching the demonstrators.