(CNN) Donald Trump will visit Japan twice in the coming months, a US official told CNN.

The US president will pay a formal visit to the close ally in late May, likely to Tokyo, after the country's current crown prince Naruhito becomes Japan's 126th Emperor.

Trump will then return in late June to attend the G20 in Osaka, the official said.

The news comes ahead of Trump's upcoming summit with North Korean leader Kim Jong Un in Hanoi, which is set to take place next week.

Trump spoke with Japan Prime Minister Shinzo Abe over the phone on Wednesday to coordinate their policies on North Korea's nuclear development, a Japanese official said.

Read More