They gazed into the workings of a rocket launchpad. They tucked into crab dumplings, sturgeon and entrecôte. And they lifted their glasses at a flower-lined table in the conference room of a remote Russian spaceport, toasting the Kremlin’s “sacred struggle” against a “band of evil,” otherwise known as the West.
The summit between President Vladimir V. Putin of Russia and the North Korean leader, Kim Jong-un, which took place Wednesday at the Vostochny Cosmodrome in eastern Russia, signaled a potential new era in relations between Moscow and Pyongyang, as two isolated leaders on wartime footing embraced each other in their moments of need.
Russia, nearing the 19-month mark in its brutal war of attrition against Ukraine, arrived requiring more ammunition and military equipment for the battlefield, which Pyongyang keeps in abundance. North Korea came looking for food, fuel and cash, according to analysts, in addition to technological help for its missile and satellite programs, and parts for its old, Soviet-era military and civilian aircraft.
By the time the two leaders had finished, with Mr. Kim scheduled to continue a rare foreign journey that would take him to aviation factories in Komsomolsk-on-Amur and naval facilities in Vladivostok, it wasn’t clear if any deals had been agreed.
But Mr. Putin was sounding optimistic in comments to state news media. He touted cooperation on highways, railways, port infrastructure and agricultural initiatives — and professed that even military cooperation was possible, despite United Nations Security Council sanctions on North Korea over its nuclear program.
“There are certain restrictions, Russia abides by those restrictions,” Mr. Putin said. “But there are things we of course can talk about. We are discussing and thinking about it. There is also promise here.”
Intended or not, the summit delivered a pointed message to Washington, demonstrating that the West’s support for Ukraine would have consequences — in this case by pushing Moscow closer to Mr. Kim’s authoritarian regime.
Russia for years had presented itself as a cooperative partner willing to join the rest of the United Nations Security Council in an international effort to thwart Mr. Kim’s nuclear ambitions. But that posture was gone on Wednesday, with almost no public discussion of nuclear disarmament.
The war in Ukraine has made North Korea far more relevant than in years past for Russia, though Mr. Kim’s isolated and impoverished nation has a history as a troublesome partner, and Moscow previously appeared wary of the country’s nuclear weapons program.
“This has historically been a very mercantile, transactional relationship,” said Scott A. Snyder, senior fellow for Korea studies at the Council on Foreign Relations. “Those two components of the relationship seem to be in closer alignment at this moment than they have been for many years.”
In Ukraine, Mr. Putin’s army is on the defensive, with analysts saying it will be unable to mount any substantive advance before the end of the year. Both Russia and Ukraine are running low on munitions.
Against that backdrop, the talks also underscored how the demands of the war and the resulting international sanctions against Russia are setting the diplomatic agenda for Mr. Putin, prompting an aggressive embrace of any leader willing to stand with him against the United States — like the supreme leader of Iran and African dictators — or lend support to Moscow in its war against Ukraine.
“The war is now the organizing principle of Russian foreign policy,” said Alexander Gabuev, director of the Carnegie Russia Eurasia Center, who said North Korea, a highly militarized society with one of the world’s largest armies and significant armament production facilities, had something to offer Moscow on that front.
Mr. Kim, who is deeply reliant on China, has found opportunities in the deepening rivalry between China and the United States, and in Russia’s war in Ukraine. Although North Korea and China have called their relations as close as “lips and teeth,” Mr. Kim has tried to lessen Beijing’s influence on his country by finding new sources of trade. Russia, which shares a small border with North Korea, is one possible alternative, but Mr. Putin, needing Chinese support, has to be careful not to cross Beijing.
Mr. Kim arrived in Russia on Tuesday from North Korea, having traveled to the meeting on his armored train. The Vostochny Cosmodrome, built by Mr. Putin as part of a broader effort to restore Russia’s glory, was symbolic for two countries that have significant ambitions in space but have suffered recent setbacks.
Last month, a Russian robotic spacecraft that launched from the facility accidentally crashed into the moon while en route to the lunar surface. Days later, North Korea’s second attempt at launching a spy satellite failed.
On Wednesday, North Korea launched two short-range ballistic missiles off its east coast, the first time the country conducted a missile test during one of Mr. Kim’s rare trips abroad.
As aides fanned out across the space facility, creating security perimeters, Mr. Putin waited out front for his guest, standing with his hands behind his back and answering questions from state news outlets.
“Are we going to help North Korea launch its satellites and rockets?” one reporter asked.
“That’s why we came here,” Mr. Putin replied, referring to the space facility. “We have good expertise, and we will show him our new infrastructure facilities.”
Mr. Kim arrived and toured the facility alongside the Russian president, at one point inspecting a launchpad and also sitting down to sign a guest book.
The two leaders met in a group with their respective ministers, including top defense officials, and afterward convened a tête-à-tête, ultimately talking for roughly two hours.
After the talks, the Kremlin said the discussion included an offer to launch a North Korean astronaut into space, but offered few other details.
The most notable public remarks came during the six-course lunch. Mr. Putin rose with a glass of red wine to toast “the strengthening of friendship and cooperation between our countries.”
Mr. Kim, in his own toast, announced he had come to a consensus with Mr. Putin on “further strengthening strategic and tactical cooperation.” He had earlier praised Russia’s war effort, calling it “just.’’
“We are confident that the Russian army and people will win a great victory in the sacred struggle to punish the band of evil that aspires to hegemony and feeds on expansionist illusions,” Mr. Kim said, an apparent reference to the United States and its allies.
Despite international sanctions and domestic economic hardship, North Korea operates one of the world’s largest standing armies and a vigorous defense industry. In July, Russia’s defense minister, Sergei K. Shoigu, visited Pyongyang, the North Korean capital, to mark the anniversary of the armistice that ended the Korean War.
U.S. officials have repeatedly warned that North Korea was shipping artillery shells and rockets for Russian use in Ukraine. They fear that Mr. Kim’s meeting with Mr. Putin will result in additional arms deals, but also acknowledge that if the two sides do reach an agreement they may never announce it.
In recent weeks, Mr. Kim has visited North Korean munitions factories, urging them to expedite the production of multiple rocket launchers, sniper rifles, drones and missiles, according to the country’s state media.
North Korea faces critical technical hurdles in its efforts to build intercontinental ballistic missiles, ballistic missile submarines, military reconnaissance satellites and antimissile defense systems — all areas where it could benefit immensely from Russian technology. Last year, a U.N. sanctions committee reported that a North Korean diplomat in Russia had tried to acquire banned materials for the North’s ICBM program.
When Mr. Kim said last week that his country was building a nuclear-propelled submarine, the program, according to Hong Min, an analyst at the Korea Institute for National Unification in Seoul, was based on “expectations that North Korea would get technological support from Russia.”
Alina Lobzina and Valeriya Safronova contributed reporting.