President Joe Biden paid an unannounced visit to Ukraine on Monday to meet with President Volodymyr Zelenskyy in a defiant display of Western solidarity with a country still fighting what he called “a brutal and unjust war” days before the one-year anniversary of Russia’s invasion.

“One year later, Kyiv stands,” Biden declared after meeting with Zelenskyy at Mariinsky Palace. Jamming his finger for emphasis on his podium flanked by U.S. and Ukrainian flags, he continued: “And Ukraine stands. Democracy stands. The Americans stand with you, and the world stands with you.”

Biden spent more than five hours in the Ukrainian capital, consulting with Zelenskyy on next steps, honoring the country’s fallen soldiers and meeting with U.S. embassy staff in the war-torn country.

The visit comes at a crucial moment: Biden is trying to keep allies unified in their support for Ukraine as the war is expected to intensify with spring offensives. Zelenskyy is pressing allies to speed up delivery of promised weapon systems and calling on the West to provide fighter jets — something that Biden has declined to do.

The U.S. president got a taste of the terror that Ukrainians have lived with for close to a year when air raids sirens howled just as he and Zelenskyy wrapped up a visit to the gold-domed St. Michael’s Cathedral.

Looking solemn, they continued unperturbed as they laid two wreaths and held a moment of silence at the Wall of Remembrance honoring Ukrainian soldiers killed since 2014, the year Russia annexed Ukraine’s Crimean peninsula and Russian-backed fighting erupted in eastern Ukraine.

The White House would not go into specifics, but national security adviser Jake Sullivan said that it notified Moscow of Biden’s visit to Kyiv shortly before his departure from Washington “for deconfliction purposes” in an effort to avoid any miscalculation that could bring the two nuclear-armed nations into direct conflict.

In Kyiv, Biden announced an additional half-billion dollars in U.S. assistance — on top of the more than $50 billion already provided — including shells for howitzers, anti-tank missiles, air surveillance radars and other aid but no new advanced weaponry.

Ukraine has also been pushing for battlefield systems that would allow its forces to strike Russian targets that have been moved back from frontline areas, out of the range of HIMARS missiles that have already been delivered. Zelenskyy said he and Biden spoke about “long-range weapons and the weapons that may still be supplied to Ukraine even though it wasn’t supplied before.” But he did not detail any new commitments.

“Our negotiations were very fruitful,” Zelenskyy added.

Biden’s mission with his visit to Kyiv, which comes ahead of a scheduled trip to Warsaw, Poland, is to underscore that the United States is prepared to stick with Ukraine “as long as it takes” to repel Russian forces even as public opinion polling suggests that U.S. and allied support for providing weaponry and direct economic assistance has started to soften. For Zelenskyy, the symbolism of having the U.S. president stand side by side with him on Ukrainian land as the anniversary nears is no small thing as he prods the U.S. and European allies to provide more advanced weaponry and to step up the pace of delivery.

“I thought it was critical that there not be any doubt, none whatsoever, about U.S. support for Ukraine in the war,” Biden said.

Biden’s visit marked a brazen rebuke to Russian President Vladimir Putin, who had hoped his military would swiftly overrun Kyiv within days. Biden, a Democrat, recalled speaking with Zelenskyy on the night of the invasion, saying, “That dark night one year ago, the world was literally at the time bracing for the fall of Kyiv. Perhaps even the end of Ukraine.”

A year later, the Ukrainian capital remains firmly in Ukrainian control. Although a semblance of normalcy has returned to the city, regular air raid sirens and frequent missile and killer-drone attacks against military and civilian infrastructure across the country are a near-constant reminder that the war is still fiercely raging. The bloodiest fighting is, for the moment, concentrated in the country’s east, particularly around the city of Bakhmut, where Russian offensives are underway.

At least six civilians have been killed and 17 more have been wounded in Ukraine over the past 24 hours, Ukraine’s presidential office reported. In the eastern Donetsk region, the Russian army was using aviation to strike cities on the front line. A total of 15 cities and villages have been shelled over the past 24 hours, according to the region’s Ukrainian Gov. Pavlo Kyrylenko. In the northeastern Kharkiv region, cities near the border with Russia came under fire. A missile strike hit Kupiansk, damaging a hospital, a plant and residential buildings.

Biden warned that the “brutal and unjust war” is far from won. “The cost that Ukraine has had to bear has been extraordinarily high. And the sacrifices have been far too great,” Biden said. “We know that there’ll be very difficult days and weeks and years ahead. But Russia’s aim was to wipe Ukraine off the map. Putin’s war of conquest is failing.”

“He’s counting on us not sticking together,” Biden said of the Russian leader. ”He thought he could outlast us. I don’t think he’s thinking that right now. God knows what he’s thinking, but I don’t think he’s thinking that. But he’s just been plain wrong. Plain wrong.”

The trip gave Biden an opportunity to get a firsthand look at the devastation the Russian invasion has caused on Ukraine. Thousands of Ukrainian troops and civilians have been killed, millions of refugees have fled the war, and Ukraine has suffered tens of billions of dollars of infrastructure damage.

Biden, wearing a blue suit and his signature aviator sunglasses, pledged long-term support for Ukraine, saying that “freedom is priceless. It’s worth fighting for for as long as it takes.”

“And that’s how long we’re going to be with you, Mr. President, for as long as it takes,” Biden promised. Zelenskyy, speaking in English, responded: “We’ll do it.”

The Ukrainian leader, wearing a black sweatshirt, as has become his wartime habit, said through an interpreter that the “wide discussion” in their meeting “brings us closer to the victory” — hopefully, he added, this year.

“Right now, in Ukraine, the destiny of the international order … is decided,” Zelenskyy said. He added words of gratitude to Biden and to the American people for their support. “Ukraine is grateful to you, Mr. President, to all the U.S. citizens, to all those who cherish freedom just as we cherish them.”

Though Western surface-to-air missile systems have bolstered Ukraine’s defensives, the visit marked the rare occasion when a U.S. president has traveled to a conflict zone where the U.S. or its allies did not have control over the airspace.

The U.S. military does not have a presence in Ukraine other than a small detachment of Marines guarding the embassy in Kyiv, making Biden’s visit more complicated than other recent visits by prior U.S. leaders to war zones.

While Biden was in Ukraine, U.S. surveillance planes, including E-3 Sentry airborne radar and an electronic RC-135W Rivet Joint aircraft, were keeping watch over Kyiv from Polish airspace.

Speculation has been building for weeks that Biden would pay a visit to Ukraine around the Feb. 24 anniversary of the Russian invasion. But the White House repeatedly had said that no presidential trip to Ukraine was planned, even after the Poland visit was announced earlier this month.

Since early morning on Monday many main streets and central blocks in Kyiv were cordoned without any official explanation. Later people started sharing videos of long motorcades of cars driving along the streets where the access was restricted.

At the White House, planning for Biden’s visit to Kyiv was tightly held — with a relatively small group of aides briefed on the plans — because of security concerns. Sullivan said Biden gave final approval for the trip, which had been in the works for months, on Friday during an Oval Office meeting at which he was briefed on security plans for the visit.

The president traveled with an usually small entourage, with just a few senior aides and two journalists, to maintain secrecy.

Asked by a reporter on Friday if Biden might include stops beyond Poland, White House National Security Council spokesman John Kirby replied, “Right now, the trip is going to be in Warsaw.” Moments later — and without prompting — Kirby added, “I said ‘right now.’ The trip will be in — to Warsaw. I didn’t want to make it sound like I was alluding to a change to it.”

Biden quietly departed from Joint Base Andrews near Washington at 4:15 a.m. on Sunday, making a stop at Ramstein Air Base in Germany before making his way into Ukraine. He arrived in Kyiv at 8 a.m. on Monday.

Other western leaders have made the trip to Kyiv since the start of the war.

In June, French President Emmanuel Macron, German Chancellor Olaf Scholz and then Italian Prime Minister Mario Draghi traveled together by night train to Kyiv to meet with Zelenskyy. British Prime Minister Rishi Sunak visited Kyiv in November shortly after taking office.

This is Biden’s first visit to a war zone as president. His recent predecessors, Donald Trump, Barack Obama and George W. Bush, made surprise visits to Afghanistan and Iraq during their presidencies to meet with U.S. troops and those countries’ leaders.