BELGOROD, Russia — Military trucks and armored personnel carriers spray-painted with the letter Z rumble through intersections, and groups of men in camouflage walk the streets and shop for military goods like thermal underwear. Refugees pour in from territories in Ukraine that were recently lost to the enemy.

The sounds of nearby explosions have become regular occurrences in Belgorod, 25 miles from the Ukrainian border, and anxious store owners call the police reporting imagined bomb threats, a sign of the paranoia that is starting to spread. Residents express fear about what will come next, with some even speculating that Ukrainian troops could take a step they have avoided for nearly seven months and enter Russian territory.

“It is as if they are already here,” an ashen-faced woman told a merchant at the city’s central market, after the boom of an explosion.

President Vladimir V. Putin has tried to keep life as normal as possible for most Russians as he conducts his war in Ukraine, and to make the hostilities a distant concept. But with Ukrainian forces now on the offensive, residents of Belgorod feel as if the war has come to their doorstep.

“There are so many rumors, people are afraid,” said Maksim, 21, a merchant at the market.

He was selling thermal underwear, camouflage jackets and other sporting goods that once went to hunters and fishermen but are now being bought up by soldiers and their relatives. Like most other residents interviewed for this article, he declined to provide his full name out of fear of retribution.

The mood at the market, a warren of stalls selling clothes, home goods and military gear, was tense. Though the city of Belgorod is not being directly attacked, Russia’s military air defense is intercepting missiles in the distance. The sounds of the explosions ring out, and in the Komsomolsky neighborhood, homes and property are being hit by debris.

On Monday, a teachers’ college, a shopping center and a bus station were conducting evacuation drills as officials assured worried local civilians that the drills were planned in advance. The regional administration is evacuating towns and villages along the border as they come under Ukrainian shelling. Denis, a local businessman, recently paid someone to dig an 11-foot bomb shelter in his yard.

Many residents of the city fear the risks to their safety are growing.

“We feel scared, and it is especially hard when you work with children,” said Ekaterina, 21, a kindergarten teacher who said a shell fragment fell onto the school early this week. “The children start running around screaming ‘missiles’ but we tell them it is just thunder.”

While most residents of Belgorod support the government in Moscow and the war effort, some express frustration that the rest of Russia is still living as if it isn’t waging a full-scale war.

“How are they not ashamed!” shouted a middle-aged woman named Lyudmila, from the Komsomosky neighborhood.

“In Moscow, they are celebrating City Day, while here blood is being spilled,” she said, referring to a citywide celebration last week honoring the founding of the Russian capital, which featured fireworks and the grand opening of a large Ferris wheel by Mr. Putin. “Here everyone is worried about our soldiers, while there everyone is partying and drinking!”

Even those who support the war effort privately expressed frustration that the Kremlin insists on calling it a “special military operation,” when they can see that it is a full-blown war. Many wonder if there will be a draft, and if so, how soon.

Refugees arriving from Ukraine are also driving home the reality of the war.

Thousands of people from eastern Ukraine have arrived in recent months, especially last week as Ukrainian troops retook territory in the northeast that had been held by Russian soldiers. Some were worried about living under the control of the Ukrainian government in Kyiv, while others, especially those who had acquired Russian passports or taken jobs in the occupying administration, feared being treated as collaborators, according to activists who are helping them leave.

“They were trying to live their lives, working in hospitals, in schools, stores, but that side understands this as collaborating with occupiers,” said Yulia Nemchinova, who has been helping refugees in Belgorod. Ms. Nemchinova, who holds pro-Russian views, left her native Kharkiv, just across the border, in 2014 after her husband had legal trouble with the Ukrainian authorities.

But she also said that many people felt shocked and effectively betrayed by a Russian army they saw as liberators, but that was now on the run in the face of a sweeping Ukrainian offensive.

“They were promised: Russia is here forever,” Ms. Nemchinova said.

While journalists and investigators are uncovering evidence of atrocities and human rights abuses committed by Russians during occupation, the people who recently fled to Belgorod say the retreating Russian army told them to leave because of potential retaliation.

In interviews in Belgorod, people who fled from territory recently retaken by Ukraine said they feared that when the Ukrainian army entered the local administration building, soldiers would find the lists of people who had accepted jobs or humanitarian assistance from the Russian interim administration and mete out punishments for collaborating. People were also scared because Ukraine passed a law punishing collaboration with the occupying authorities with 10 to 15 years in prison.

A woman named Irina said her boyfriend, a former Ukrainian border guard, had his personal information posted in a Telegram group purporting to name collaborators.

“There’s no going back there,” Irina, 18, said in an interview at a clothing bank where newly arrived refugees were collecting clothes and food. Her mother and sister remained in their village, and she said she hoped the Russians reoccupied it soon.

In Belgorod, a city of 400,000, fears about Ukrainians on the other side of the border would have been unheard-of a decade ago. For years, Russians in Belgorod regularly traveled the 50 miles to Kharkiv — Ukraine’s second biggest city, with a prewar population of 2 million — to party, dine and shop. Many families are split across the border.

“Belgorod was in total shock,” said Oleg Ksenov, 41, a restaurant owner who has spent the past months evacuating people from battlefields in Ukraine and bringing them to Russia. “We just love Kharkiv.”

Viktoriya, 50, who owns a cafe and bakery in the city, said that Kharkiv was a “megapolis” in the minds of every Belgorod resident.

“We had a joke: If you want to meet people from Belgorod, go to Stargorod restaurant in Kharkiv on the weekend,” she said.

The relationship worked both ways. In the years after Russia instigated a separatist war in Ukraine’s eastern Donbas region, Ukraine imposed stricter laws about speaking Ukrainian, and not Russian, in public. That prompted Russian speakers from Kharkiv to travel to Belgorod to watch movies in Russian, said Denis, the businessman, who is 44.

Now the two cities are effectively separated by a front line.

“It is a tragedy of tectonic proportions,” he said. “It touches every person from Belgorod. Every family is connected with Ukraine.”

His aunt Larisa had just arrived over the weekend from Liman, a city in the Donetsk region that was occupied by the Russian army at the end of May. Since then, it has had no electricity, gas or running water, and she said more than 80 percent of the housing stock was destroyed.

Earlier in May, a missile — she didn’t know from which army, though she blamed Ukraine — hit her apartment building. Then, at the end of the month, the Russians arrived.

“I was waiting for them with so much happiness,” Larisa, 74, said in surzhik, a dialect that is a mixture of Ukrainian and Russian.

Now her home is the scene of heavy frontline fighting. She said she has trouble walking, and struggled to get to the basement every time the air raid siren sounded.

As the fighting grew closer, she said, she knew she had to get out, because she didn’t want to be governed anymore by Kyiv and was scared.

Mr. Ksenov, who was born in Kharkiv but made Belgorod his home more than a decade ago, has dedicated his time to helping civilians flee from Ukraine to Russia. He worries about what will happen to the people from border regions of both countries in the long term.

“This slaughter will eventually end,” he said of the war, in an interview in his restaurant, which has plywood covering the windows in case of a bombing.

“But who will we be? How will we look one another in the eyes?”

Anastasia Trofimova contributed reporting.