Prince Hisahito, the 12-year-old grandson of Emperor Akihito and soon-to-be second-in-line to the throne, graduated Friday from an elementary school affiliated with Ochanomizu University in Tokyo.

The prince will become second-in-line to the Chrysanthemum Throne after the 85-year-old Emperor abdicates at the end of next month, to be succeeded by his eldest son, Crown Prince Naruhito, on May 1. Prince Akishino, the younger son of the Emperor and the father of Prince Hisahito, will become first-in-line to the throne.

The Imperial House Law states that only males with male lineal descent from emperors can ascend the throne. Prince Hisahito remains the only male of his generation.

In a graduation essay, the prince looked back on his years at the school, where he took part in activities such as searching for herbs and trees, as well as conducting research into Tokyo's municipalities.

"We live in the midst of nature," the prince said in a handwritten message attached to the essay.

According to the Imperial Household Agency, the prince was responsible for looking after the school's rabbits and flower beds in his final years at the institution.

He also took part in an overnight school trip to Nagano Prefecture in early March, where he enjoyed activities such as pottery and curling.

The prince will continue his education at a junior high school associated with the women's university.

Prince Hisahito, who had attended a kindergarten also associated with Ochanomizu University, enrolled in the elementary school in April 2013. He is the first member of the Imperial family in the postwar period to attend and graduate from a school other than Gakushuin Primary School in Tokyo.

Gakushuin University was established in the 19th century as a school for aristocrats. Most imperial family members have attended schools associated with the university.