Former U.S. President Barack Obama stressed Sunday the importance of the Japan-U.S. alliance and the international community working together to deal with the threat from North Korea.

"North Korea is a real threat," Obama, who is currently visiting Japan as part of a four-nation tour of Asia and Oceania, said at an international forum in Tokyo hosted by a private organization.

(Photo courtesy of Tokyo-based Worldwide Support for Development)

"Pyongyang has consistently pursued the development of nuclear weapons, (North Korean leader) Kim Jong Un is not shy about announcing his intentions to produce even more nuclear weapons, test nuclear weapons and develop the delivery system capabilities that pose a significant threat not just to the region but around the world."

Obama said that while the ideal is to resolve the threat from North Korea peacefully, it is important for the Japan-U.S. alliance to continue to work with South Korea and China to keep pressure on Pyongyang.

"So far we have not seen as much progress obviously as we would have liked but I think the one thing that is important is to recognize that individually, no country can solve this problem as effectively as if we all work together," he said.

Obama also recalled his visit to Hiroshima in 2016 as an "extraordinary powerful moment," saying the trip was not only to speak about nuclear weapons but the necessity for countries to find ways to reduce tensions and avoid war whenever possible.

Obama, who won the Nobel Peace Prize for his stated intention to seek a world without nuclear weapons, became the first incumbent U.S. leader to visit Hiroshima, which was devastated by the first U.S. atomic bombing late in World War II.

Obama and Japanese Prime Minister Shinzo Abe also visited Hawaii's Pearl Harbor in a show of reconciliation between the two former wartime foes.

"I think the relationship between the United States and Japan is symbolic of the way in which former adversaries can be extraordinary friends and allies and turn swords into plowshares and create prosperity for not only our two countries but also create stability for the world," Obama said.

Following the forum, Obama met with Abe for lunch at a sushi restaurant to "renew friendship," according to the Japanese government.