Business is booming.

Russia Tried to Absorb a Ukrainian City. It Didn’t Work.

KHERSON, Ukraine – Iryna Dyagileva’s daughter attended a school where the curriculum included memorizing the Russian national anthem. But the teachers ignored it and instead quietly greeted the students in the morning with a greeting: “Glory to Ukraine!”

The occupation authorities asked Olha Malyarchuk, a clerk at a taxi company, to settle bills in rubles. But she continued to pay in Ukrainian currency, the hryvnia.

“It just didn’t work,” said Ms. Malyarchuk on the Russian propaganda beamed into television and plastered on billboards during the nine months of Russia’s occupation of Kherson. On Sunday, she walked in a park waving a small Ukrainian flag.

A roadside billboard proclaimed in bold text: “We are with Russia!” But a teenager, who offered only his first name, Oleksandr, had shimmied up the support pole and was about to tear the sign to pieces. Asked how he was doing, he said, “Free.”

Defying the odds after its much stronger neighbor invaded in February, the Ukrainian army has recaptured hundreds of villages and towns in three major counteroffensives north of Kiev, in the northeastern Kharkiv region and now in the southern Kherson region.

But the city of Kherson stands out: It was the focus of an ambitious Russian campaign to assimilate its citizens and eradicate Ukrainian identity — a goal that President Vladimir V. Putin had for all of Ukraine, if his military had been more successful, judging by his claims that Ukrainians and Russians are one nation.

In Kherson, national songs were banned. Speaking Ukrainian can lead to arrest. Schools adopted Russian curricula and young students had to be taught that they were Russians, not Ukrainians.

In the early days of the city’s liberation, it appears that these Russian efforts were largely in vain, at least among those who remained in the city as Ukrainian forces approached.

Serhiy Bloshko, a construction worker, had lived in friends’ houses throughout the nine-month occupation for fear of arrest for taking part in anti-occupation protests in March, shortly after the Russian army arrived. Soldiers went to his home. When they didn’t find him, they made off with his television and refrigerator, he said.

But the Russians found some of his friends who were detained and disappeared, he said.

“They suppressed the pro-Ukrainian population,” said Mr. Bloshko, who was interviewed in the water queue on Sunday afternoon. Of the cultural assimilation effort, he said, “What happened here was ethnic cleansing.”

The way each army entered his city, one in February, the other last week, was telling, he said.

“When our soldiers drove in, their machine guns were pointed in the air,” Mr. Bloshko said. “When the Russians drove in, their weapons were aimed at the people. That explains everything. And they said they were our liberators.”

Across Ukraine, the war has been notable as a time of accelerated cultural separation of Ukrainians from Russian – the exact opposite of what Mr Putin had sought to achieve.

Bilingual Ukrainians who spoke Russian before the war switched to Ukrainian. Writers in Kiev proposed closing a museum dedicated to Mikhail Bulgakov, a native of the city but one who wrote in Russian. The mayor of Odesa, the Black Sea city founded by Tsar Catherine the Great, has said her statue will be torn down.

What began a decade ago, after Russia intervened militarily in eastern Ukraine, as a “decommunization” policy of banning Soviet-era place and street names has expanded into Russian cultural references. Cities, for example, rename their many Pushkin streets, named in honor of the Russian poet Alexander Pushkin.

In Kherson over the weekend, residents who might have felt more warm to the Russian assimilation effort were absent, which was hardly surprising since many had evacuated when the Ukrainians closed in and the Russian government urged residents to leave . Many local officials had collaborated with the Russians.

Three days after the Russian army left, several hundred residents of Kherson were still celebrating in a central square.

But fear had also crept in. Throughout the day, bombardment from artillery strikes in or near the city occasionally sounded, and Russian troops remain close by, on the opposite bank of the Dnipro River.

Mrs. Malyarchuk, the taxi driver, said that despite the failures of the assimilation program, the occupying power pressed on, publishing Russian newspapers and broadcasting a pro-Moscow local television news program. On Thursday, as they pulled out, Russian soldiers blew up the TV tower to prevent Ukraine from now broadcasting pro-Ukrainian news into the nearby occupied territory.

Mrs. Malyarchuk credited the Ukrainian army’s strategy of patiently degrading Russian forces and launching precise attacks on Russian supply lines and positions in and around Kherson for months with preserving the city itself. That approach, she said, also preserved support for Ukraine’s government.

An attack by a precision-guided HIMARS rocket, she said, had hit a Russian garrison in a residential neighborhood about 150 meters from her home, blowing out windows but injuring no civilians. “It was a beautiful explosion,” she said.

“Thank God for America, Canada and Great Britain, and thank God for Grandpa Biden,” she said, noting the Western military aid that helped Ukraine repel the Russians from her city.

In the city center, a Russian base across the street from a hospital appeared hollowed out from the inside by a direct hit. Only jagged remains of outer walls remained. But the explosion didn’t even break windows in the hospital itself.

Dr. Ivan Terpak, a family doctor at the hospital, said the strike had been worth the risk to patients and medical staff and was necessary to drive out the Russians. “They wouldn’t have gone if we didn’t shoot at them,” he said.

“No one asked me,” said Dr. Terpak, “but if they did, I would have said, ‘Go ahead and take the shot.'”

Along Ushakova Avenue, an elegant tree-lined boulevard that runs through the city, most buildings were undamaged.

Mrs. Dyagileva said she had sent her daughter to school only after making sure the teaching staff remained secretly patriotic and played along with Russian-appointed administrators but did not teach the prescribed curriculum. Teachers at other schools taught the Russian program, she said.

Iryna Rodavanova, a retired curator at the Kherson Art Museum, said the Russian soldiers’ brutality had alienated residents and undermined efforts at cultural assimilation. Soldiers beat her husband on the side of the road after accusing him of a traffic violation.

“I agree with our president,” Ms. Rodavanova said. “Better without electricity, without water and without heat, if also without the Russians.”

Curiously, weeks before they retreated, Russian soldiers carried away the bones of 18th-century Russian aristocrat Prince Grigory Aleksandrovich Potemkin, removing as they left a potent historical and cultural symbol of the city’s ties to Russia. Prince Potemkin, a lover of Catherine the Great, was considered the founder of the modern city of Kherson.

Father Vitaly, a priest at St. Catherine’s Cathedral, said that from time to time throughout the occupation, Russian officers had turned up at the cathedral to visit the crypt containing Prince Potemkin’s bones.

Soldiers arrived wearing balaclava masks and said they would protect the bones from the Ukrainian attack. Two soldiers carried the bones, kept in a charcoal-colored cloth bag, and two others the wooden coffin where they had been lying for two centuries, Father Vitaly said.

“It was the most important relic of our church,” he said. “But it’s more important to them than to us. He is a significant historical figure and a symbol of Russian imperial ambitions.”

Ukraine should ask for the bones back, Father Vitaly said, adding, however, that the people of Kherson won’t really mind if they don’t come back.

“We don’t need the bones,” he said. “Maybe the next generation will even forget they were ever here.”

Marc Santora contributed reporting from Kiev, Ukraine.