Japanese Prime Minister Fumio Kishida will meet Ukrainian President Volodymyr Zelensky during a surprise visit to Kyiv on Tuesday to offer "solidarity and unwavering support," Japan's foreign ministry said.
Kishida is the last G7 leader to visit the war-torn country and has come under increasing pressure to make the trip, as Japan hosts the grouping's summit this May.
He has repeatedly said a visit to Kyiv was "under consideration," though security and logistical challenges were reportedly a major obstacle.
Kishida was in India on Monday and had been expected to return to Tokyo, but instead flew to Poland, where he reportedly boarded a train to cross into Ukraine.
He will express "respect for the courage and perseverance of the Ukrainian people" and offer "the solidarity and unwavering support for Ukraine of Japan and the G7, chaired by Japan," the foreign ministry said.
Kishida is expected to return to Poland for summit talks on Wednesday, the foreign ministry said, before arriving back in Tokyo on Thursday.
News of the trip was first reported by Japanese media, including national broadcaster NHK, whose reporters in Poland filmed a car carrying the premier in the town of Przemysl, from where foreign leaders have often taken the train into Ukraine.
Kishida became the only G7 leader not to have visited Kyiv after US President Joe Biden made a surprise stop to meet Zelensky in February.
But Japanese officials were reportedly worried about the security risks of a trip for Kishida, who becomes the first Japanese prime minister to visit an active warzone since World War II.
His trip comes with Chinese President Xi Jinping visiting Moscow for talks with Russian leader Vladimir Putin, with the Ukraine conflict high on the agenda.
Japan has joined Western allies in sanctioning Russia over its invasion of Ukraine while offering support to Kyiv.
It has also taken the rare steps of sending defensive equipment and offering refuge to those fleeing the conflict.
It has not offered military support, however, because the nation's post-war constitution limits its military capacity to ostensibly defensive measures.
Kishida warned in a speech last year that "Ukraine today may be East Asia tomorrow", as concerns grow that China could invade democratic, self-ruled Taiwan.
And in December, as Japan overhauled its key defence policies, the government explicitly warned that China poses the "greatest strategic challenge ever" to its security.
In its largest defence shake-up in decades, Japan set a goal of doubling defence spending to the NATO standard of two per cent of GDP by 2027.
Japan is this year's host of the Group of Seven nations, which have taken a united approach in sanctioning Russia.
The countries will meet for a summit in Hiroshima in May, which Kishida is reportedly considering inviting Zelensky to attend.
Kishida has been on a diplomatic blitz in recent days, hosting South Korean President Yoon Suk Yeol and German Chancellor Olaf Scholz in Tokyo before heading to New Delhi for talks with Indian Prime Minister Narendra Modi.