Japan’s emperor has marked his last birthday before his abdication next year by calling for his country’s younger generations to be taught accurately about the horrors of war and expressing relief that his reign has been a peaceful one for Japan.

A record 82,850 people cheered and waved Japanese hinomaru flags as Emperor Akihito, who turned 85 on Sunday, appeared on the balcony of the imperial palace in Tokyo with Empress Michiko, his eldest son and heir Crown Prince Naruhito and other members of his family.

Naruhito, 58, will ascend to the Chrysanthemum throne on 1 May, the day after his father, who has had heart surgery and treatment for prostate cancer, becomes the first Japanese emperor to abdicate in 200 years. The last was Emperor Kōkaku in 1817.

Akihito returned to the legacy of the second world war in his pre-recorded speech, a subject that has helped define his 30-year reign, known as heisei, or achieving peace.

“It is important not to forget that countless lives were lost in the second world war and that the peace and prosperity of postwar Japan was built upon the numerous sacrifices and tireless efforts made by the Japanese people, and to pass on this history accurately to those born after the war,” he said.

Referring to the “end of my journey as emperor”, Akihito, whose voice appeared to tremble with emotion, added: “It gives me deep comfort that the heisei era is coming to an end, free of war in Japan.”

Akihito has become an enormously popular figure since succeeding his father, Hirohito, Japan’s wartime emperor, in January 1989. He has used his reign to call for an honest appraisal of history, including comments that some have interpreted as a gentle swipe at the country’s conservative prime minister, Shinzō Abe.

Japan’s postwar constitution prohibits the emperor from wielding political influence, but the imperial couple have promoted reconciliation with former victims of Japanese wartime aggression.

In 1992, Akihito became the first Japanese emperor to visit China, telling his hosts he “deeply deplored” an “unfortunate period in which my country inflicted great suffering on the people of China” during a war fought in the name of his father.

In his birthday address, he also noted the sacrifice made by the people of the southern Japanese island of Okinawa, the scene of a fierce battle during the war and home to tens of thousands of US troops.

“Okinawa has experienced a long history of hardships, including what happened there during the war,” he said. “We are committed to continue to care for the sacrifices that the people of Okinawa have endured over the years, and that commitment will remain unchanged in the future.”

He and Michiko, a non-royal whom he met while playing tennis, have also played a prominent role in helping the victims of natural disasters, making several visits to the region devastated by the March 2011 earthquake and tsunami.

He referred in his address to earthquakes, floods, landslides and a heatwave that killed hundreds of people over the past year. “My thoughts go out to those who have lost family members or those close to them, or have suffered damage and whose lives are currently impaired,” he said.

Speaking soon after parliament passed a law to bring in hundreds of thousands of immigrant workers to address Japan’s labour shortage, he said he hoped the country's people would “be able to warmly welcome as members of our society those who come to Japan to work”.