KHERSON, Ukraine — The little green van sped down the road, the Russian forces just across the river. Inside, Halyna Luhova, the mayor of Kherson, cradled a helmet in her lap and gazed out the bulletproof window.

When the first shell ripped open, directly in the path of the van, maybe 200 yards ahead, her driver locked his elbows and tightened his grip on the wheel and drove straight through the cloud of fresh black smoke.

“Oh my god,” Ms. Luhova said, as we raced with her through the city. “They’re hunting me.”

The second shell landed even closer.

She’s been almost killed six times. She sleeps on a cot in a hallway. She makes $375 a month, and her city in southern Ukraine has become one of the war’s most pummeled places, fired on by Russian artillery nearly every hour.

But Ms. Luhova, the only female mayor of a major city in Ukraine, remains determined to project a sense of normality even though Kherson is anything but normal. She holds regular meetings — in underground bunkers. She excoriates department heads — for taking too long to set up bomb shelters. She circulates in neighborhoods and chit-chats with residents — whose lives have been torn apart by explosions.

She chalks up any complaints about corruption or mismanagement — and there are plenty — to rumor-mongering by Russian-backed collaborators who are paid to frustrate her administration.

Kherson, a port city on the Dnipro River, was captured by Russian forces in March; liberated by Ukrainian forces in November; and now, three months later, lies nearly deserted. Packs of out-of-school children roam the empty boulevards lined with leafless trees and centuries-old buildings cracked in half.

Ms. Luhova sees her job defined by basic verbs: bury, clean, fix and feed. Of the 10 percent or so of Kherson’s original population of 330,000 who remain, many are too old, too poor, too stubborn or too strung out to flee.

She recently became so overwhelmed with their needs — for food, water, generators, internet access, buses, pensions, medicine, firewood — that she said she dropped to 40 minutes of sleep a night and became so exhausted, she had to be put on intravenous drugs. She feels better, she said, though not exactly calm.

“We need those bomb shelters, now,” she snapped at a meeting in early February, when it was several degrees below freezing outside.

In front of her, in an underground office, sat the heads of the city’s main departments, many in winter jackets and hats. The office had no heat.

She was pushing to acquire dozens of free-standing concrete bomb shelters. When an administrator responded that the contracting process needed to be followed or they could be accused of corruption, she exploded.

“You are doing nothing, and I’m getting really pissed off at your stupidity,” Ms. Luhova said.

“I feel like I don’t have enough air when I’m standing next to you! You will answer in your own blood, your own blood!”

The administrator rolled his eyes and went outside to smoke a cigarette.

In a political culture dominated by macho guys — the mayor of the capital of Kyiv, for instance, is a towering former heavyweight boxing champion — Ms. Luhova, 46, in her gray suede boots and black puffy jacket with the fake fur collar, cuts a different figure. Raised by a single mom during the Soviet Union’s last gasps, she laughed thinking about the hardships back then.

“All those terrible lines for beet root — imagine, beet root!” she said.

By the time she was 21, Ukraine was newly independent and she was teaching English at a neighborhood school, married and a mother. She climbed the ranks to school director, which she used as a springboard to be elected to Kherson’s city council eight years ago. Before the Russian invasion last February, she was the council’s secretary, considered the No. 2 official.

Russian forces burned down her house in March, and she left the city shortly after. The Russians tried to make Kherson part of Russia, forcing children to learn Russian in schools and people to use Russian rubles in the markets. In June, they kidnapped her boss, Kherson’s prior mayor, and he hasn’t been seen since. Ms. Luhova took his place and became the head of Kherson’s military administration.

When she returned in November, she found a city ecstatic that the Russians had been driven out but in terrible shape. The Russians had looted everything from water treatment equipment and centuries old fine art to Kherson’s fleet of fire trucks and buses. But the Russians didn’t go far.

Ukraine didn’t have the momentum or spare troops to pursue them across the river. So now the Russians sit on the opposite bank across from Kherson and fire at will.

No city in Ukraine, outside the Donbas region in the east where the Russians are advancing, is getting shelled as badly as Kherson. In the past two and half months, Ukrainian officials said, it has been hit more than 1,800 times.

The shells come with no warning. There are no air raid sirens. These are projectiles fired from tanks, artillery guns, mortars and rocket launchers that blow up a few seconds later — the Russians are that close, 700 meters in some places. Residents have almost no time to take cover.

The other afternoon, a rocket attack killed two men walking down a sidewalk. There was no military installation nearby.

“Russia’s precise rationale for expending its strained ammunition stocks here is unclear,” said a recent British Defense Intelligence update on Kherson.

Since mid-November, Ukrainian officials say the Russians have wounded hundreds of residents and killed more than 75.

“It’s just revenge,” Ms. Luhova said. “There’s an old saying: “If I can’t have it, nobody can,’’’ she said, trying to explain why the Russians would shell the city after retreating. “It’s that stupid but it’s true.”

Kherson may be a war-torn city on the front line of Europe’s deadliest conflict in generations, and Ms. Luhova may represent Ukraine’s never-give-up spirit that keeps a Russian flag from flying over this country.

But as in any other city, residents love complaining about their mayor.

“I’ve called more than a hundred times to have my electricity fixed and nobody comes,” said Olena Yermolenko, a retiree who helped run a cell of citizen spies during the Russian occupation. She also repeated accusations on social media that the mayor was stealing humanitarian aid, which Ms. Luhova strongly denied.

Oleksandr Slobozhan, the executive director of the Association of Ukrainian Cities, said that from everything he knew, the accusations were a smear campaign by pro-Russian agents.

Despite the challenges, Ms. Luhova is determined to keep the city running, in the most basic ways. She recently traveled to Kyiv to ask Mr. Slobozhan for 20 buses.

“We are paralyzed,” she said. “Our trolleys don’t work and we can’t fix them because when our workers go up to repair the lines, the snipers are killing them.”

She left with a promise of 20 buses.

“I like the way she works,” Mr. Slobozhan later said. “She goes forward no matter what.”

Ms. Luhova is planning to attend a donor’s conference in Poland later this month; she has been out of the country only a few times in her life. Where she really wants to go is Bali.

“I heard you go there and you come back looking younger,” she joked.

Her husband is a taxi driver in another city, and her two adult sons live far away so she is on her own in Kherson. Most days, she can be found moving around in her little green van.

When we rode along with her, and the shell exploded on the road, her driver turned around as fast as he could.

But the Russians were tracking her. From across the river, they fired a second round. It slammed into a house along the road, and the blast wave shook the van. The van kept going but the munition felt lethally intimate.

That evening, at a house where she stays with friends, on a small pullout bed in a hallway off the kitchen, Ms. Luhova shrugged off the close call.

Over a spread of deliciously crunchy homemade pickles and little squares of Brie, she held a glass of cognac between her fingers and made a toast to victory.

“If I could disappear into the air and end this war, I would,” she said. “I’d easily sacrifice myself for ending this hell.”

Oleksandra Mykolyshyn contributed reporting.