KYIV, Ukraine — After almost a year of war, Kyiv is used to the unexpected.

On Monday the surprise was a welcome one, with Ukrainians hailing President Joe Biden's visit as a historic moment that carried huge symbolism ahead of the one-year anniversary of Russia's full-scale invasion.

Before news of Biden's secret trip filtered out, residents of the Ukrainian capital reported closed roads and unusual traffic jams, stoking the social media rumor mill with suggestions of a high-profile guest. Few expected to see the president of the United States walking around the center of town soon after, an unannounced ambassador of hope that the Western alliance backing Kyiv's defense against the Kremlin's attacks can remain strong.

Evheniy Lazarenko, 30, told NBC News he was surprised given the dangers involved, which made Biden's presence all the more appreciated.

"It gives a sense that we are not alone, we do have support, the biggest part of the world and greatest leaders are with us," said Lazarenko, a manager at an IT company in Kyiv. He added that he was grateful to all Americans who are "following the news and supporting Ukraine."

Anna Myryasheva, a 24-year-old market researcher in Kyiv, said the visit gave her "joy and hope."

"It is remarkable that international partners are coming to see everything with their own eyes, despite the danger. As a person who lives in Kyiv, and expects heavy shelling soon, I feel great today," she said.

Biden is the latest in a long line of Western leaders to visit Kyiv, but his presence brought a smile to the face of Zelenskyy and many others in Ukraine. Photo: AP

Their sentiments were echoed by officials in Kyiv, who lauded Biden's trip at a pivotal moment in the war.

“Your visit is an extremely important sign of support for all Ukrainians,” President Volodymyr Zelenskyy said on his Telegram channel.

The two leaders embraced before heading out for a walk punctuated by air raid sirens that are all-too familiar for the city's regular occupants. Still, a year ago many from Washington to Warsaw feared that by now Kyiv might be in the grip of Russian President Vladimir Putin.

"One year later, Kyiv stands and Ukraine stands," Biden said. "Democracy stands."

He came bearing news of more military aid, too, announcing a range of new assistance for Ukraine as well as additional sanctions on Russian companies.

Andrii Yermak, head of Zelenskyy's office, hailed the visit as historic, but added that it was also "strategic."

"A lot of issues are being resolved and those that have been pending will be expedited," he said in a Telegram post. Yermak later shared a picture of a plaque installed to mark Biden's visit in the Walk of the Brave in Kyiv's Constitution Square, which honors leaders who have supported Ukraine since the invasion.

President Biden walks with Ukrainian President Zelensky at St. Michael's Golden-Domed Cathedral in Kyiv on Monday. Photo: Evan Vucci / Pool via AFP - Getty Images

'A surprise is being prepared'

Kyiv has had no shortage of visiting foreign dignitaries in recent months, including a European Union chief, two British prime ministers, French President Emmanuel Macron and other senior U.S. officials.

But Biden's visit is arguably the most significant of all — a morale-boosting gesture after a grinding year of war, just as Russia launches a new push on the battlefield and some Western powers show signs they may be tempted to nudge Kyiv toward a peace deal.

The president had been due to embark on a scheduled trip to Europe to show solidarity with Ukraine and its neighboring countries, many of whom have long raised fears about Russia’s militant imperialism.

But the five-hour stop in Kyiv was organized in the strictest secrecy.

The White House had denied any plans for the president to visit Ukraine, a risky venture given the ongoing conflict — though officials later confirmed that Russia had been notified ahead of time "for deconfliction purposes." Few others were.

Instead the apparent presence of U.S. military aircraft in the area, videos showing a motorcade driving through restricted streets and news of a trip canceled at the last minute by Ukraine's foreign minister stoked theories about what might be afoot.

Private messaging groups and public-facing social media were awash with excited speculation, but officials would only hint at what was to come.

“A surprise is being prepared," said Deputy Foreign Minister Andriy Melnyk, urging residents perturbed by traffic jams in the capital to be patient when he appeared on a local news channel early Monday.

Biden arrived around 8am local time (1 a.m. ET) but the visit was not publicly confirmed until midday local time (5 a.m. ET).

Kremlin loyalists were unimpressed.

Former President Dmitry Medvedev said Biden had used his trip to promise "a lot of weapons and [swear] allegiance to the neo-Nazi regime to the grave," a reference to Putin's baseless description of the Ukrainian government.

The Russian leader is due to make a closely-watched speech Tuesday to mark a year since the start of his "special military operation."

Biden's trip may have upstaged Putin and drawn ire in Moscow, but in Kyiv it was a cause for expressions of joy — and memes.

Photos featuring Biden added to images of everyday life in Ukraine swiftly made their way across social media. One showed him eating an ice cream, another had him shopping for groceries, commenting on the currently high price of eggs.

Some tweets simply asked that Biden follow the U.S. promise to send battle tanks with a commitment to provide fighter jets. Tanks are cool, one said, "but they don't fly."

Biden's visit is doubly significant, coming on Feb. 20, when Ukraine remembers anti-government protesters killed in 2014, a group known as the Heavenly Hundred. Those protests were sparked by Moscow-backed leader Viktor Yanukovych’s refusal to sign an agreement to forge closer ties with Europe.

Fast forward nine years and Ukraine is a candidate to join the European Union, while the Kremlin's designs on the country appear increasingly likely to remain frustrated.

As one analyst put it: "Biden made it to Kyiv before Putin."

Daryna Mayer reported from Kyiv, and Patrick Smith from London.