POKROVSK, Ukraine—As Russian troops closed in on the eastern Ukrainian city of Soledar , police detective Maksym Mashkin was called in to investigate two corpses found in one of the bomb-ravaged city’s basement shelters.

A middle-aged couple had been beaten and thrown into the basement, where the killers then lobbed a grenade. When the explosion didn’t kill Tetiana and Anatoliy Borshchevskiy, the killers got a knife from their kitchen and finished them off.

The killers weren’t Russian. Mashkin quickly pieced together that they were locals, whose appearance at the Borshchevskiys’ one cold night was driven by the stresses of war, a brutal conflict that provided prime conditions for potentially getting away with murder.

“The war did that to people,” Mashkin said. “I don’t want to say that such crimes weren’t committed before the war, but the war contributed.”

Mashkin also knew justice would be hard to come by, as police and courts grapple with depleted staff, shifting front lines and constant bombardment.

For all the savagery of war and the solidarity and heroism it often engenders, the violence, thieving and fraud of everyday life doesn’t end. Studies even suggest that crime increases on the home front in wartime, as criminals and ordinary people alike take advantage of the chaos and the drop-off in working police.

For investigators like Mashkin, the war has shrunk their budgets and manpower, with police resources diverted to cases related to war crimes and Russian attacks. Attending bomb sites to help collect body parts is now one of their primary roles.

One of the officers who first responded to the Borshchevskiy house, Kyrylo Davydenko, later said that he couldn’t recall many details of the scene, having dealt with more than 100 mutilated corpses in the months since.

Artur Marianian, the local police chief, has already lost almost half of his force to Russia’s invasion. Those left often must work out of cell-like basements in towns like Chasiv Yar in Ukraine’s eastern Donetsk region, which has been shelled constantly since the summer of 2022. The original police station there was destroyed last March.

“Every time you go to Chasiv Yar you hope you are going to come back alive,” said Marianian.

Many Ukrainians believe that Russia’s invasion brought them together as a nation. People have raised millions of dollars to buy military equipment. Civilians helped the army evacuate flooded areas when Russia destroyed the Kakhovka hydroelectric power plant last June.

Such stories act to further rally a population under fire, even as they mask the trauma that afflicts many of them.

The British often talk of their togetherness and self-sacrifice as Nazi Germany bombed U.K. cities. But crime, including theft, looting and prostitution, also thrived. A Nazi bomb hit a high-society London nightclub in 1941, killing 36 of those inside. Police arrived to find thieves taking jewelry from corpses.

In Ukraine, between 2021, the last full year before Russia’s full-scale invasion, and 2023, a category of violent crime that includes assault and homicide doubled and fraud more than tripled, according to official numbers analyzed by Olena Shostko, a Ukrainian criminologist.

The numbers are even more stark considering that more than 6 million residents have fled and 20% of the country is in Russian hands.

A local resident looks at buildings damaged by a Russian military strike, amid Russia’s attack on Ukraine, in the city of Chasiv Yar, in Donetsk region, Ukraine February 27, 2023. REUTERS/Alex Babenko

Denys Maliuska, Ukraine’s minister of justice, worries that crime will worsen once the war is over, as more than half a million people return from the front, many with access to weapons and with deep psychological scars.

“I really don’t want to go back”

The Borshchevskiys met near Soledar in 1992, married six months later and were rarely apart in the decades that followed, according to their children, Andriy and Alyona.

At a recent meeting, the siblings talked of a happy childhood filled with family holidays and birthday parties. Alyona has won medals in the world and European powerlifting championships, an achievement she attributes to parental support.

Their father worked mining the local salt deposit that gave Soledar its name, “salt gift.” The couple was entrepreneurial and in a country with an average GDP per capita of less than $4,000 a year, they farmed animals and sold their produce in a local market. After the war began, they started a prosperous business bringing in much-needed food and fuel into Soledar.

The children tried to persuade their parents to join them in cities further west. In October 2022, the couple visited their daughter at her apartment in Dnipro. As Tetiana was about to get into the car for the journey back to Soledar, she turned to her daughter.

“I really don’t want to go back,” Alyona remembers her saying.

“Then stay,” Alyona told her.

But Tetiana didn’t want to leave her husband in Soledar. Alyona never saw her again.

While both children had known their parents were at grave risk of being killed by Russian fire, they say they had never imagined it would be at the hands of Ukrainians.

They would soon receive another shock: Their family had known two of the suspects well.

Anatoliy Ponomarenko, 30, who prosecutors say hatched the plan, had lived down the street from the Borshchevskiys and been in the same school class as Andriy.

The product of a broken home, Ponomarenko was a violent troublemaker at school, according to Andriy, a burly former miner who said he had always avoided him.

In 2015 Ponomarenko was jailed for 5½ years for theft and carjacking, according to a court filing.

Another suspect, Viktor Lyashkov, had worked at a local hardware store where the Borshchevskiys shopped.

The war had created the perfect conditions for the killers on the evening of Nov. 26, 2022.

Many Soledar residents had already fled Russia’s advance, so the couple had few neighbors. Continual explosions meant that screams or the sound of a grenade wouldn’t arouse local suspicion.

Ponomarenko was living with his wife and other families in a cramped basement due to the war. On the day of the murder, he drank heavily with Lyashkov and another man, Andrii Orlov. They drove a stolen car to the Borshchevskiy’s house, arriving at 5 p.m.

Ponomarenko called out to Tetiana, who went to greet him at the garden gate, according to the indictment.

Both Ponomarenko and Lyashkov hit the 47-year-old woman in the face several times. When her husband came out, Lyashkov threatened to kill his wife with an air pistol and Ponomarenko hit Anatoliy in the face, the indictment says.

The couple were ordered into the basement where Ponomarenko threw the grenade. When the blast didn’t kill them, Ponomarenko told Lyashkov to fetch a knife from the kitchen. Lyashkov then stabbed both Borshchevskiys once in the neck, according to the indictment.

Because the Borshchevskiys knew the men, the suspects always intended to kill the couple, prosecutors say. The motive, they said, was to finance a better life for themselves in other, safer parts of Ukraine.

Their take from the crime was around 70,000 hryvnia, just over $1,800, as well as the Borshchevskiys’ car. The suspects left behind a safe in the house that held a much larger amount of cash along with the family’s gold jewelry.

A husband’s last act

While the war had created ideal conditions for the killing, it would prove problematic in the getaway.

After the murder, Lyashkov and Ponomarenko spent the night in the nearby city of Pokrovsk. As they headed to Odesa the following day, they hit a checkpoint—one of many set up around eastern Ukraine after the Russian invasion. An officer there spotted the license number of the stolen car.

Searching the car, police found a bag of clothes with traces of what would later prove to be the Borshchevskiys’ blood. Police found a bracelet, cellphones and other property of the couple on the two men.

Mashkin met them at the local station. It didn’t take long for Ponomarenko to confess.

“I asked him why,” said Mashkin. “He said he wanted to start a new life.”

In police website footage, Ponomarenko was even more blunt about motive.

“Money. Money. We wanted to make money,” he said.

Lyashkov and Ponomarenko have pleaded guilty to premeditated murder. Orlov pleaded innocent, saying he was a lookout and didn’t know his accomplices intended to murder the couple. Asked in court, all three declined to be interviewed.

“My clients admit their guilt and sincerely repent,” said Dmytro Polishchuk, the lawyer for Lyashkov and Ponomarenko. A lawyer for Orlov declined to comment.

Even after the arrests, the path to justice wasn’t smooth. The bombardment of Soledar was so intense that Mashkin’s first crime-scene visit was postponed. Witnesses had to be brought out of the city in armored vehicles.

The case moved from court to court as Russia pressed forward, with sittings disturbed by air raids. Witnesses and evidence vanished behind enemy lines.

For Mashkin, he said, what happened in Soledar wasn’t even the most gruesome or brutal crime in his young career.

“You leave your heart at home,” said Mashkin, who is married with one child and works out for two hours at 6 a.m. several mornings a week to clear his mind of the job’s stress.

When Mashkin first looked through the pictures of the bodies he felt little emotion.

But as he looked again at the photos he noticed something that brought humanity back through the violence and his own cynicism. In Anatoliy Borshchevskiy’s last moments he had covered his wife to shield her from the grenade blast.

“They were together for 30 years of marriage and were together until their last breath,” he said. “And the husband… put all his [last] strength into saving his wife.”

Five months after the murders, Alyona and Andriy Borshchevskiy met in Dnipro to do something that their father had always forbidden—get a tattoo.

On a recent day, while leaving the courthouse in Dnipro, the brother and sister pulled up clothes to reveal the designs they chose: two intertwined hearts underlined by two words—dad, mum.

The slain couple’s son, Andriy Borshchevskiy, got the words dad and mum tattooed on his arm.

Write to Alistair MacDonald at Alistair.Macdonald@wsj.com