KYIV, Ukraine — In a pine forest not far from Ukraine’s capital, a mock battle raged. Commanders barked orders. Figures in camouflage huddled behind trees. A soldier fell to the ground, yelling for help.
His cries provided the cue for Anastasia Biloshitska, 25, to run into the line of fire, kneel in the mud and open her medical kit.
“People who are prepared won’t panic,” Ms. Biloshitska said.
Ms. Biloshitska is one of thousands of Ukrainian civilians who have signed up to learn combat skills in training programs created and run by the government and private paramilitary groups. The programs are part of the country’s strategic defense plan in the event of a potential invasion by Russia — to foster a civilian resistance that can carry on the fight if the Ukrainian military is overwhelmed.
There is no indication that President Vladimir V. Putin of Russia has made up his mind whether to launch an attack. But if one should come, even Ukraine’s own generals say their regular military stands little chance in a full-fledged invasion.
So Ukraine has drawn a lesson from the United States’ wars in Iraq and Afghanistan of the past two decades, when guerrillas provided enduring resistance in the face of vastly superior American firepower.
“We have a strong army, but not strong enough to defend against Russia,” said Marta Yuzkiv, a doctor working in clinical research, who signed up for training this month. “If we are occupied, and I hope that doesn’t happen, we will become the national resistance.”
Government-sponsored training for civilians has underpinned Nordic and Swiss military strategies for decades, and is gaining traction as a military doctrine in Eastern Europe.
Spurred on by Russian threats, Estonia, Latvia and Lithuania all have programs encouraging rifle ownership for some civilians and formal training to fight as partisans after an occupation.
Nearly every weekend in Estonia, for example, the Defense League, a self-defense organization, holds exercises in the forests for volunteers, right down to making improvised explosive devices, or I.E.D.s, the weapon that plagued the United States military in Iraq and Afghanistan.
Civilian defense is not unfamiliar in Ukraine; volunteer brigades formed the backbone of the country’s force in the east in 2014, the first year of the war against Russian separatists, when the Ukrainian military was in shambles.
This effort is now being formalized into units of the newly formed Territorial Defense Forces, a part of the military. Last year, the Ukrainian Army began weekend training for civilian volunteers in these units.
The government runs, and pays for, some of the training sessions through the Territorial Defense Forces. Private paramilitary groups like the Ukrainian Legion run other sessions, for which their members pay all the costs. The legion conducted the program in the forest outside Kyiv this month.
The goal is not to achieve victory against the weight of the Russian military, which would be virtually impossible for Ukraine anyway. Rather it is to create the threat of disruption and resistance to an occupying force that would serve as a deterrent to an invasion.
Gen. Anatoliy Barhylevych, deputy commander of Ukraine’s ground forces, has said that the country aims to turn out about 100,000 volunteers in the event of conflict. But a spokesman for the Ukrainian Defense Forces said he could not disclose how many people had formally enlisted in the training programs.
Opinion surveys suggest some support for the effort. A poll this fall, for example, showed 24 percent of Ukrainians saying they would resist “with a weapon in hand” if Russia invaded. Among men, 39 percent said they would resist with weapons. Ukrainians have taken to posting selfies on social media holding rifles.
Ukrainian commanders say that half a million Ukrainians have military experience, and that they hope many would join a fight, including those belonging to private groups like the Ukrainian Legion.
But skeptics say that this is partly bluster, and that the Ukrainian command could hardly count on a flood of veterans becoming insurgents.
In the forest, shrouded in a bitter-cold morning mist, schoolteachers, accountants, waitresses and programmers spilled out of Toyotas and Fords and made their way to the training sessions.
At one picnic area, the lesson of the day was topical, if nerve-rattling: how to screw a fuse into the slab of high explosives of an anti-tank mine.
“We don’t have many Javelins and the Russians have a lot of tanks,” said Mykhailo Hiraldo-Ramires, the instructor. The Javelin is a type of American anti-tank missile that the United States has provided to the Ukrainian Army in limited numbers. “We will get them with these so-called pancakes instead.”
Mr. Hiraldo-Ramires demonstrated how to install and arm the detonator, using a model of a mine. This requires removing a metal safety ribbon and pushing a button that when depressed makes a startling snapping noise, indicating the mine is armed. After you do that, he said, you should “move back to a safe distance.”
Ihor Gribenoshko, 56, an advertising executive at a pharmaceutical company, took notes. “The more coffins we send back, the more the Russian people will start thinking twice,” he said.
Understand the Escalating Tensions Over Ukraine
Ominous warnings. Russia called the strike a destabilizing act that violated the cease-fire agreement, raising fears of a new intervention in Ukraine that could draw the United States and Europe into a new phase of the conflict.
The Kremlin’s position. President Vladimir V. Putin of Russia, who has increasingly portrayed NATO’s eastward expansion as an existential threat to his country, said that Moscow’s military buildup was a response to Ukraine’s deepening partnership with the alliance.
The Ukrainian Legion does not distribute weapons, and instead encourages members to train with their own rifles. It also does not explain how the explosives would wind up in civilian hands. But members said they keep rucksacks in their homes packed with walkie-talkies, medical kits, sleeping bags and warm clothes — ready at a moment’s notice.
Critics point to perils in the plan for civilian defense. One concern is that domestic political divisions could spark violence from armed militias. Some scenarios envision Moscow seizing on this vulnerability, turning nationalist militias into a destabilizing threat to the government.
In an invasion, these groups could “quickly turn into a decentralized insurgency in many parts of the country” a study of scenarios for war between Ukraine and Russia by the Institute for the Study of War in Washington noted.
Others worry that the effort encourages private gun ownership, which carries risks in crime, suicide and domestic violence. Ukrainian law requires a psychological examination to obtain a gun license. In a country of about 40 million, 1.3 million Ukrainians own licensed civilian firearms, according to the Interior Ministry.
The civilian training include lectures as well as hands-on sessions. This month, the day before the program in the forest, about 100 people filed into a concert hall in an outlying district of Kyiv, griping about the limited on-street parking and lining up at a vending machine for coffee.
They came for a nearly two-hour lecture sponsored by the Territorial Defense Forces on likely plans of attack on Kyiv — including armored columns rolling in on highways or paratroopers seizing the airport — by Lt. Yuri Matviyenko, a former Ukrainian military attaché to Israel.
“Expect a fast storming,” he said. “We won’t have much time.”
He described how the volunteers might resist based on the tactics of Islamist militias in Aleppo, Syria. The volunteers should use their knowledge of their own neighborhoods to move close to the Russian soldiers, leaving too little separation to call in airstrikes or artillery, he said.
The next day, out in the pine forest, Ms. Biloshitska — who studied to be a teacher but is now working as a waitress — examined the man playing the role of a casualty as she trained to provide first aid. It did not look good. Small strips of red duct tape indicated multiple wounds. Pressure was applied. Gauze came out. A mock radio call took place.
“Artillery! One! Two! Three!” an instructor yelled. Ms. Biloshitska tumbled to the ground, taking cover, then sprang back up to stanch the bleeding.
On a typical weekend, Ms. Biloshitska said, she might read a book, do laundry or meet a friend at a coffee shop. Learning to dress battle wounds was a new experience.
Ms. Biloshitska treated an area marked as an exit wound on the man’s back. Finally, panting, sweating and surrounded by discarded bandages and medical gloves, she was finished. “How do you feel?” she asked the man.
“Terrible,” he said. “I was shot in the chest.”