Vladimir Putin has invited Kim Jong-un to visit Russia during a lengthy meeting in Beijing on the sidelines of China’s biggest military parade, as Kim promised to do “everything I can to assist” Moscow.

The invitation, made through interpreters and shown in a video published by the Kremlin, came as Ukraine’s president, Volodymyr Zelenskyy, accused Putin of demonstrating his “impunity” with fresh strikes on Ukraine overnight.

Putin and Kim, the authoritarian leaders of Russia and North Korea, were in the Chinese capital as guests of Xi Jinping for a ceremony marking the 80th anniversary of the end of the second world war, known in China as the war of resistance against Japanese aggression.

North Korea has supported Russia in its war against Ukraine with weapons and troops.

The two leaders appeared alongside Xi at the opening of Wednesday’s ceremony, talking as they walked side by side on the red carpet into Tiananmen Square. It is believed to be the first time the three leaders have been in the same place together.

In a bilateral meeting that lasted more than two hours, Kim was recorded telling Putin “see you soon” and hugging him goodbye.

“We are waiting for you, come visit us,” Putin replied.

A visit to Russia would be just the third time Kim has travelled abroad in six years. The first was to the far east of Russia in 2023, and the second this week’s visit to Beijing, arriving on an armoured train.

North Korea has become a key Russian support since the country invaded Ukraine in 2022. Pyongyang sent weapons including artillery shells and missiles to Russia for the war and thousands of troops to fight in Russia’s Kursk region, where Ukrainian forces had made a cross-border incursion, although the deployment was initially denied.

Russia and North Korea last year signed an agreement that mutually obliges them to provide “military and other assistance” in the event the other is attacked.

Putin thanked North Korea for sending troops to fight against Ukraine, describing them as fighting “courageously and heroically” in the Kursk region.

Xi Jinping (centre) with Vladimir Putin and Kim Jong-un at China’s military parade. Photograph: Anadolu/Getty Images

Putin’s visit to Beijing, which followed the Shanghai Cooperation Summit in Tianjin on Sunday and a bilateral meeting with Xi, came as Russia launched a sweeping overnight attack on Ukraine.

An estimated 500 drones and two dozen missiles were fired at western and central Ukraine, targeting civilian infrastructure, especially energy facilities. Ukraine said at least four railway workers were injured. The attack also prompted Poland to scramble defence aircraft.

On Wednesday Zelenskyy said Putin was “showing his impunity”, urging tougher sanctions on Moscow. “This undoubtedly requires a response from the world. It is only due to the lack of sufficient pressure, primarily on Russia’s war economy, that this aggression continues,” Zelenskyy said ahead of meetings with officials from Baltic and Nordic countries in Denmark.

Zelenskyy has accepted Donald Trump’s proposals for a ceasefire and face-to-face peace talks with Putin, but the Kremlin has raised objections. At the Tianjin summit Putin said he had reached “understandings” with Trump at their meeting in Alaska last month, which he said he hoped were “moving in this direction, opening the way to peace in Ukraine”.

Putin is wanted by the international criminal court over alleged war crimes in Ukraine, and there are calls by some international law experts for an arrest warrant to be issued against Kim for aiding Russia’s war.

There has been no announcement of a formal trilateral meeting between Kim, Putin and Xi in Beijing.

While Xi and Putin have declared a “limitless” partnership, analysts say Beijing is rankled by Russia’s ongoing war in Ukraine and North Korea’s direct support of it. Xi is striving to balance his alliance with both nations, while at the same time avoiding further sanctions from the US and other allies of Ukraine.