KYIV, Ukraine — The Ukrainian soldiers arrived like heroes, greeted with kisses and songs. In the city of Kherson, which had endured months of Russian occupation, residents poured into the streets on Friday. They hoisted Ukrainian flags, and danced in joy around a glowing bonfire.
Their excitement, which was captured on videos they sent out to the world, did not erase the momentous problems that a brutal war has inflicted. Despite a Russian retreat, there was still uncertainty about the future, worries about further attacks and concerns about the lack of food, fuel and electricity.
And there was dread that the full human cost of nine months of Russian rule would soon become clear.
But above all in Kherson, a provincial capital that had once been one of Russia’s biggest prizes of war, there was unbridled jubilation and a fragile sense of relief. It was a feeling echoed across the country.
“Kherson is Ukrainian!” shouted one man who was filmed standing outside the Kherson regional government headquarters on Friday afternoon as Ukrainian soldiers cautiously made their way into the city. Everywhere Ukrainian soldiers were seen, residents said, they were mobbed by crowds wanting to touch them, kiss them, shake their hands.
In phone and text message interviews, residents said the emotional moment harked back to March 13, 1944 — the day the city was liberated from Nazi forces. But the sense of newfound freedom was also offset by uncertainty and fear.
Residents and the Ukrainian military worried that Russian soldiers dressed in civilian clothes could be hiding in homes scattered around the city.
But people still took to the streets on Friday. A video showed several climbing a ladder to reach a billboard showing a young girl holding a Russian flag, beside the words “Russia is here forever!”
Ukrainian soldiers entering one village outside the city were greeted by a young girl playing the national anthem on the violin, rubble and destruction all around her, a video showed.
Some Ukrainians on Friday said they were in a state of shock at what was happening around them. “It is still difficult to believe this,” said Yuriy Antoshchuk, a resident of Kherson who recently fled the city. “From the inside, I am bursting with pride for all the people of Kherson who have endured this,” he said. That was only matched by “immense, boundless gratitude to the armed forces, to whom I mentally bow.”
To mark the Russian retreat, the Ukrainian postal service issued a new stamp featuring the prize product of the nation’s agricultural heartland: the watermelon.
“Kherson is Ukraine!” the words on the stamp proclaimed. All government agencies changed their official logos to include images of watermelons.
The sense of joy followed an intense period of suffering in the Kherson region, where Russian authorities had sought to Russify a defiant local population. Moscow introduced Russian currency, forced teachers to adopt a “Russian curriculum,” and brought in Russian businesses. It also imposed curfews and warned that those who breached them could be shot.
Moscow staged a referendum in early September, when some residents were forced to vote at gunpoint. Last month, President Vladimir V. Putin signed papers formalizing the illegal annexation of the territory.
One month later, one of the two proxy leaders appointed by the Kremlin to run the civilian administration was dead, killed earlier in the week in a car crash. The other had disappeared from public view, having fled to new headquarters in territory under Russian control.
In recent weeks, Kherson has been looted, the power cut off and internet connections severed. But on Friday people found a way to charge their cellphones to tape videos to document the moment, sharing the celebrations with journalists on social media channels and with government officials.
Mr. Antoshchuk, like people all across the country, found it difficult to concentrate on anything else and was glued to his cellphone for the latest updates flooding Telegram and other social media channels. “Today, he said, “only sincere feelings of joy and gratitude.”
But, like others interviewed, he did not know what tomorrow — or even tonight — will bring.
The depth of the suffering in Kherson has yet to come into focus. For months, residents have recounted stories of friends being abducted, children being illegally deported and relatives being tortured and killed. They offered the same grim tableau that has become a hallmark of the Russian occupation and thoroughly documented by international journalists, human rights groups and Ukrainian investigators.
Even as they warned of hard days ahead in their effort to drive Russia completely out of Ukraine, officials in Kyiv celebrated the moment, while also noting that many military analysts said this day would never come.
“In February, the Ukrainian army was given ‘three days,’” said Mykhailo Podolyak, a top adviser to the Ukrainian president, said. “To date, we have defended Kyiv, liberated three regions, de-occupied Kharkiv Oblast and approached Kherson. If these nine months should teach anything, it is not to be afraid of the ‘Russian bear,’ not to run away from a fight, to hold a blow and believe in Ukraine.”
The campaign to drive the Russians out of Kherson played out over months. But the end came swiftly. Throughout the night in Kherson, residents saw convoys of Russian soldiers racing to escape. Explosions rocked the city and people hunkered in their homes. Then it all went quiet. By afternoon, it started to become clear the Russians were gone.
Residents who had hidden their Ukrainian flags pulled them out and slowly made their way to the city center to await the arrival of Ukrainian troops.
When those troops started to arrive in the city, the celebrations grew. People marched through the streets with banners of blue and gold.
As night fell, residents of Kherson lit a fire and sang an old Cossack folk song, “Red Kalyna,” which was banned under Russia’s occupation of Kherson and refers to a Ukrainian berry.
“In the meadow, there, a red kalyna has bent down low. For some reason, our glorious Ukraine has been worried so,” they sang. “And we’ll take that red kalyna and we will raise it up!”