KYIV, UKRAINE -- U.S. President Joe Biden鈥檚 motorcade slipped out of the White House around 3:30 a.m. Sunday. No big, flashy Air Force One for this trip -鈥 the president vanished into the darkness on an Air Force C-32, a modified Boeing 757 normally used for domestic trips to smaller airports.

The next time he turned up 鈥 20 hours later 鈥 it was in downtown Kyiv, Ukraine.

Biden鈥檚 surprise 23-hour visit to Ukraine on Monday was the first time in modern history that a U.S. leader visited a warzone outside the aegis of the U.S. military 鈥 a feat the White House said carried some risk even though Moscow was given a heads-up.

Over the next five hours, the president made multiple stops around town 鈥 ferried about in a white SUV rather than the presidential limousine 鈥 without any announcement to the Ukrainian public that he was there. But all that activity attracted enough attention that word of his presence leaked out well before he could get back to Poland, which was the original plan. Aides at the White House were surprised the secret held as long as it did.

But Russia knew what the Ukrainian public did not. U.S. officials had given Moscow notice of Biden's trip.

The president had been itching since last year to join the parade of other Western officials who have visited Kyiv to pledge support standing shoulder to shoulder with Ukrainian President Volodymyr Zelenskyy in the capital.

Biden's planned trip to Warsaw, Poland, and the Presidents' Day holiday provided an obvious opening to tack on a stop in Kyiv. A small group of senior officials at the White House and across U.S. national security agencies set about working in secret for months to make it happen, national security adviser Jake Sullivan said Monday. Biden only gave the final sign-off Friday.

Sullivan said the trip 鈥渞equired a security, operational, and logistical effort from professionals across the U.S. government to take what was an inherently risky undertaking and make it a manageable risk.鈥

Once Biden was secreted aboard the Air Force jet, the call sign 鈥淪AM060,鈥 for Special Air Mission, was used for the plane instead of the usual 鈥淎ir Force One.鈥 It was parked in the dark with the window-shades down, and took off from Joint Base Andrews at 4:15 a.m. Eastern time.

After a refuelling stop in Germany, where the president was kept aboard the aircraft, Biden鈥檚 plane switched off its transponder for the roughly hour-long flight to Rzeszow, Poland, the airport that has served as the gateway for billions of dollars in Western arms and VIP visitors into Ukraine. From there, he boarded a train for the roughly 10-hour overnight trip to Kyiv.

He arrived in the capital at 8 a.m. Monday, was greeted by Ambassador Bridget Brink and entered his motorcade for the drive to Mariinsky Palace. Even while he was on the ground in Ukraine, flights transporting military equipment and other goods were continuing unabated to Rzeszow from Western cities.

Meanwhile, in Kyiv, many main streets and central blocks were cordoned off without explanation. People started sharing videos of long motorcades of cars speeding along streets where access was restricted 鈥 the first clues that Biden had arrived.

Biden travelled with a far smaller than usual retinue: Sullivan, deputy chief of staff Jen O鈥橫alley Dillon and the director of Oval Office operations, Annie Tomasini. They were joined by his Secret Service detail, the military aide carrying the so-called 鈥渘uclear football,鈥 a small medical team and the official White House photographer.

Only two journalists were on board instead of the usual complement of 13. Their electronic devices were powered off and turned over to the White House for the duration of the trip into Ukraine. A small number of journalists based in Ukraine were summoned to a downtown hotel on Monday morning to join them, not informed that Biden was visiting until shortly before his arrival.

Even with Western surface-to-air missile systems bolstering Ukraine鈥檚 defences, it was rare for a U.S. leader to travel 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鈥檚 visit more complicated than visits by prior U.S. leaders to war zones.

鈥淲e did notify the Russians that President Biden will be travelling to Kyiv,鈥 Sullivan told reporters. 鈥淲e did so some hours before his departure for deconfliction purposes.鈥 He declined to specify the exact message or to whom it was delivered but said the heads-up was to avoid any miscalculation that could bring the two nuclear-armed nations into direct conflict.

While Biden was in Kyiv, 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.

The sealing off of Kyiv roads that are usually humming with traffic brought an eerie calm to the centre of the capital. It was so quiet that crows could be heard cawing as Biden and Zelenskyy walked from their motorcade to the gold-domed St. Michael鈥檚 Cathedral under skies as blue as the outer walls of the cathedral itself.

鈥淟et鈥檚 walk in and take a look,鈥 Biden said, wearing his trademark aviator sunglasses against the glare. The presidents disappeared inside as heavily armed soldiers stood guard outside.

Cathedral bells chirped at the stroke of 11:30 a.m. followed shortly by air raid alarms, at 11:34 a.m., just before the men reemerged. The sirens were first a distant howl rising over the city, followed seconds later by alarms from mobile phone apps wailing from people鈥檚 pockets.

Those alarms are voiced by 鈥淪tar Wars鈥 actor Mark Hamill, and his Luke Skywalker voice urged people to take cover, warning: 鈥淒on鈥檛 be careless. Your overconfidence is your weakness.鈥

The two leaders walked at a measured pace with no outward signs of concern through the cathedral's arched front gate onto the square in front, where the rusting hulks of destroyed Russian tanks and other armored vehicles have been stationed as grim reminders of the war.

When the square isn鈥檛 blocked off, as it was during the leaders鈥 visit, people come to look at the vehicles, many taking selfies.

Biden appeared to pay the hulks no mind as he and Zelenskyy followed behind honour guards carrying two wreaths to the wall of remembrance honouring Ukrainian soldiers killed since 2014, the year Russia annexed Ukraine鈥檚 Crimean peninsula and Russian-backed fighting erupted in eastern Ukraine.

It was only then that the first images of Biden in the capital popped up on Ukrainian social media and the secret visit became global news.

鈥淗e is like an example of a president who is not afraid to show up in Ukraine and to support us,鈥 said Kyiv resident Myroslava Renova, 23, after Biden鈥檚 visit became known.

Biden headed to the U.S. Embassy for a brief stop before departing the country by train back to Poland aboard a well-appointed, wood-panelled train car with tightly drawn curtains, a dining table and a leather sofa.

The all-clear notice, also voiced by Hamill, sounded at 1:07 p.m., as Biden's train was pulling away from the station.

鈥淭he air alert is over," Hamill said. 鈥淢ay the force be with you.鈥

___

Associated Press photographer Evan Vucci reported from aboard Biden's aircraft and in Kyiv. Miller reported from Washington. Associated Press writers Aamer Madhani in Washington and Nicolae Dumitrache in Kyiv contributed.