The road to Kherson is long, straight and empty. Vacant fields rise from either side.

Entering town from the west, you pass the ATB supermarket, one of the mainstays of the city’s shopping. It was blown up a few weeks ago, in the middle of the day, with shoppers inside.

After that lie more crushed buildings, disassembled by Russian artillery shells.

“Death is everywhere,” said Halyna Luhova, Kherson’s deputy mayor.

Indeed, it comes in many forms, and at any time. People have been killed waiting for the bus, waiting for the train, walking to work and in their sleep.

No city in Ukraine has experienced such a reversal of fortune as Kherson, a port on the Dnipro River near the Black Sea. It was seized by Russian forces in early March 2022, then jubilantly recaptured by Ukrainian forces in November. But instead of enjoying the fruits of liberation, Kherson is now a kill zone.

As Ukraine prepares for a critical counteroffensive and builds up troops and supplies along the river, the Russians are hammering it harder than ever.

“Last week was a terrible week, a black week,” Ms. Luhova said on Tuesday. Twenty-seven people were killed, 40 injured.

She was dressed in black and standing outside a funeral home, an all-too-familiar scene. “The enemy is an animal,” she said.

In front of her stood two open caskets, a mother and daughter, crushed when the walls of their house were blown apart. The mother, in her 80s, had been a nurse during Soviet times. Her daughter, in her 50s, was a teacher.

“We can’t understand it,” said Tamara Smoliarchuk, whose sister and mother were lying in the coffins. “Every day they kill us.”

Many people here believe the relentless shelling is Russia’s revenge for losing the city. Last year, Russia’s leader, Vladimir V. Putin, invested heavily in Kherson, sending in Russian administrators, crates of Russian rubles and even Russian families to turn Kherson into a mini-Russia.

But in November, facing a steady advance of Ukrainian troops, the Russians suddenly pulled out. It was a searing humiliation for Mr. Putin, who, according to American officials, had denied Russian commanders’ requests to retreat even sooner.

As soon as Kherson was liberated, crowds of beleaguered residents flooded into the town square, honking, hugging, kissing, singing patriotic songs and crying deeply repressed tears of relief.

Images of the celebrations were beamed around the world, and some Ukrainians allowed themselves to believe that Kherson might be a symbol of something bigger, maybe even the beginning of the end of their horror.

But the Russians didn’t go far. They pulled back just to the other side of the river and now blast across the water, sometimes less than a mile away, with tanks, artillery, mortars and rockets. Ukrainians say that Russians are also using warplanes to bomb villages around Kherson. When the Ukrainians shoot back from their artillery positions within the city, that just draws even heavier Russian fire.

More ordinary people are getting killed here than anywhere else except perhaps along the front line in the eastern Donbas region, according to daily reports from the Ukrainian military. Officials in the Kherson region said that since liberation, at least 236 civilians have lost their lives. The city itself has been shelled more than 2,000 times.

Last week, a team of de-miners, guys who had stuck together through some very dangerous situations, was working in a windswept field on the outskirts of town. A Russian drone spotted them. It dropped a grenade. The grenade ignited a pile of mines. Local officials said six men were killed, in an instant.

Military analysts say the Russians may be bombarding Kherson to frustrate any plans the Ukrainians have to cross the Dnipro River, a watery front line. In the past few weeks, as the counteroffensive looms, Ukrainian commanders have bolstered their forces across the south, readying new brigades and new European- and American-supplied weaponry. Ukraine is under immense pressure to show progress on the battlefield, fearing that if it doesn’t, it will begin to lose Western support.

Up and down the marshy riverbanks in Kherson, Ukrainian forces are eying Russian positions just across the water. Small teams of Ukrainian commandos have picked up the tempo of their cross-river raids, residents said, and at night orange fires burn on the horizon.

But the military’s plans remain top secret and mysterious even to the people who live here.

Ms. Luhova, who had served as Kherson’s mayor for much of the past year but became deputy mayor in a recent reshuffle, pointed to another danger: “betrayers.”

“There are people still among us calling in positions, identifying where our troops are, trying to target me and other officials,” she said. She herself has nearly been assassinated six times.

“We should kill them,” she said. “I’m serious. We have to kill them. They have no right to live. It is because of them people are dying.”

While millions of Ukrainians have returned home recently to towns across the country, that is not the case in Kherson. People are leaving, businesses are closing, long city buses chug past with only three passengers inside. Bus stops are now fortified with sandbags, but people are still getting killed just trying to make it home. This city used to have 300,000 people. Now, maybe 50,000. Or fewer.

The civilians who remain are those who need the most support, Ms. Luhova said, such as the old, the infirm and those with addiction problems — people who, when it comes to getting to a safer place, don’t have the resources or the will.

Andriy Nemykin, the nephew and grandson of the two women whose funeral was held on Tuesday, said he had tried and tried to persuade them to leave. He lives in Kyiv, the capital.

“There were so many words,” he said. “But they always said: ‘Where? Where will we go? Nobody needs us.”

Ms. Luhova and other city officials have organized evacuations. But these days, even with the heavy shelling, there are few takers. A sense of stubborn fatalism runs through those who have chosen to stay, including Ms. Luhova, who says: “The people here need me.”

The women who sweep Kherson’s streets now wear body armor. They say it’s bulky and heavy, but they don’t want to take it off.

“I have this fear that I’m not going to have enough time, that I’m going to die soon,” said Liudmyla Chaika as she leaned on her broom near a small pile of flower petals she had swept together.

“I can’t get used to this shelling. I feel the danger,” she said. “But where, where am I supposed to go?”

She said that she slept with her dog, Kraz, for comfort and that he seemed to take comfort in it, too.

Even on a sunny day, Kherson feels eerie, especially the main square. Not so long ago, it was crammed with so many happy people that it was hard to walk across. Now, it lies deserted. It looks enormous. It stands as a heavy presence in the center of town.

“But I’m not worried,’’ said Tetiana Yudina, a shop manager, as she walked past. “I hope…” “No,” she corrected herself. “I believe, I know,” she emphasized, “that everyone will come back.”

Anastasia Kuznietsova contributed reporting from Mantua, Italy, and Evelina Riabenko from Kherson.