Japanese Emperor Naruhito greeted U.S. President Donald Trump on Monday as his first state guest since ascending the throne on May 1, with the two affirming the closeness of ties between the countries that were once wartime foes.

Trump and first lady Melania were warmly received by the emperor and Empress Masako throughout the day, starting with a welcoming ceremony at the Imperial Palace in central Tokyo in the morning and a state banquet in the evening.

The Japanese government chose the Trumps to become the first state guests of the country's new imperial era called Reiwa, which followed the abdication of former Emperor Akihito -- the first Japanese monarch to step down in 202 years.

Calling it a great pleasure to welcome the Trumps, the emperor said in a speech at the banquet how the two countries and their peoples have "overcome various challenges and have fostered mutual understanding and trust."

"I sincerely hope that, while always taking it to heart that the current Japan-U.S. relations are built upon the sacrifices and dedicated efforts made by so many people, the peoples of our two countries will continue to contribute to peace and prosperity in the world," he said.

Trump, for his part, extended his best wishes to the imperial family and Japan for a "peaceful and prosperous" Reiwa era and called the bilateral alliance a "rich inheritance and a gift" that the two countries should pass on to future generations.

Monday's events with the Trumps kicked off a new period of imperial diplomacy overseen by an emperor and empress who have a wide range of international experience, more so than any of their predecessors, as both have spent a number of years living overseas.

Emperor Naruhito, 59, is the first Japanese emperor born after World War II and to have studied abroad -- at the University of Oxford -- and his wife Masako, 55, is a former diplomat educated at Oxford and Harvard.

In their first encounter in the morning, the imperial couple and the Trumps shook hands and exchanged greetings without using interpreters, before walking along a red carpet in the courtyard of the palace to attend the outdoor welcome ceremony.

In summer-like heat, Trump, dressed in a dark suit and red tie, and the first lady, wearing a white dress, stood on a platform as the national anthems of the two countries were performed. Trump was then received with a guard of honor.

The emperor wore a dark suit and a blue tie, while the empress donned a cream-colored dress and matching hat.

Following the ceremony, the imperial couple held a 15-minute meeting with the Trumps inside the palace, with Trump hailing the two countries' ties, saying their relationship had overcome various challenges in history including the war, according to the Imperial Household Agency.

Asked by Trump how former Emperor Akihito and former Empress Michiko are doing, whom the president met during his previous visit to Japan in 2017, Emperor Naruhito responded they are doing well. Empress Masako and the first lady talked about their children's education, according to the agency.

Abe, Trump hold talks as Japan-U.S. trade, North Korea loom large

Abe, Trump relax over traditional charcoal grill dinner in Tokyo

IN PHOTOS: Trump plays golf, watches sumo with Abe in Japan

(Emperor Naruhito, right, and Trump at the Imperial Palace)
[Pool photo/Kyodo]

(From left: Emperor Naruhito, President Trump, first lady Melania, Empress Masako)
[Pool photo/Kyodo]

The Trumps presented a vintage 1938 viola made in the United States to the emperor, who is known for playing the instrument. They gave the empress a White House desk set including a fountain pen, handcrafted out of a red oak tree from the grounds of Harvard University.

Trump received a dark blue porcelain bowl for display, and his wife a lacquer box decorated with gold, from the imperial couple.

After the talks, Trump said it was "a great honor and a great thing" to meet the new emperor, who took over the Chrysanthemum Throne in the first accession of its kind in around two centuries.

"It's a very important thing not only in Japan, but all over the world they are talking about it, and it's very exciting to be a part of it," Trump said.

The Trumps, who arrived Saturday, are staying three nights in Japan.

During a summit with Abe in Washington ahead of Emperor Naruhito's enthronement, Trump said he had initially hesitated to accept an invitation to meet the emperor, unsure if he could make the trip.

Trump said he had asked Abe how big the imperial succession would be for the Japanese people compared with the Super Bowl and Abe replied, "It's about 100 times bigger," leading him to immediately agree to visit.

Related coverage:

Japan-U.S. first ladies visit art museum while husbands play golf

Trump attends sumo tournament, presents American trophy

Trump hints won't push Japan for trade deal before summer election