KYIV, Ukraine (AP) — Russian President Vladimir Putin ordered a partial mobilization of reservists Wednesday, taking a risky and deeply unpopular step that follows humiliating setbacks for his troops nearly seven months after invading Ukraine.

The first such call-up in Russia since World War II heightened tensions with Ukraine’s Western backers, who derided it as an act of weakness and desperation.

The move also sent some Russians scrambling to buy plane tickets to flee the country, and others into the streets to stage anti-war demonstrations.

In his 14-minute nationally televised address, Putin also warned the West that he isn’t bluffing about using everything at his disposal to protect Russia — an apparent reference to his nuclear arsenal. He has previously told the West not to back Russia against the wall and has rebuked NATO countries for supplying weapons to Ukraine.

Confronted with steep battlefield losses, expanding front lines and a conflict that has raged longer than expected, the Kremlin has struggled to replenish its troops in Ukraine, reportedly even resorting to widespread recruitment in prisons.

In this image made from a video released by the Russian Presidential Press Service, Russian President Vladimir Putin addresses the nation in Moscow, Russia, Wednesday, Sept. 21, 2022. (Russian Presidential Press Service via AP)

The total number of reservists to be called up could be as high as 300,000, officials said. However, Putin’s decree authorizing the partial mobilization, which took effect immediately, offered few details, raising suspicions that the draft could be broadened at any moment. Notably, one clause was kept secret.

Despite Russia’s harsh laws against criticizing the military and the war, protesters outraged by the mobilization overcame their fears of arrest to stage street protests in several cities across the country. More than 800 Russians were arrested in anti-war demonstrations in 37 cities, including Moscow and St. Petersburg, according to the independent Russian human rights group OVD-Info.

Associated Press journalists in Moscow witnessed at least a dozen arrests in the first 15 minutes of a nighttime protest in the capital, with police in heavy body armor tackling demonstrators in front of Moscow shops, hauling some away as they chanted, “No to war!”

“I’m not afraid. I’m not afraid of anything. The most valuable thing that they can take from us is the life of our children. I won’t give them life of my child,” said one Muscovite, who declined to give her name.

Asked whether protesting would help, she said: “It won’t help, but it’s my civic duty to express my stance. No to war!”

In Yekaterinburg, Russia’s fourth-largest city, police hauled onto buses some of the 40 protesters who were detained at an anti-war rally. One woman in a wheelchair shouted, referring to the Russian president: “Goddamn bald-headed ‘nut job’. He’s going to drop a bomb on us, and we’re all still protecting him. I’ve said enough.”

The Vesna opposition movement called for protests, saying: “Thousands of Russian men — our fathers, brothers and husbands — will be thrown into the meat grinder of the war. What will they be dying for? What will mothers and children be crying for?”

As protest calls circulated online, the Moscow prosecutor’s office warned that organizing or participating in such actions could lead to up to 15 years in prison. Authorities issued similar warnings ahead of other protests recently. Wednesday’s were the first nationwide anti-war protests since the fighting began in late February.

Other Russians responded by trying to leave the country, and flights out quickly became booked.

In Armenia, Sergey arrived with his 17-year-old son, saying they had prepared for such a scenario. Another Russian, Valery, said his wife’s family lives in Kyiv, and mobilization is out of the question for him “just for the moral aspect alone.” Both men declined to give their last names.

The state communication watchdog Roskomnadzor warned media that access to their websites would be blocked for transmitting “false information” about the mobilization. It was unclear exactly what that meant.

Residents in Ukraine’s second-largest city, Kharkiv, appeared despondent about the mobilization as they watched emergency workers clear debris from Russian rocket attacks on two apartment buildings.

“You just don’t know what to expect from him,” said one Kharkiv resident, Olena Milevska, 66. “But you do understand that it’s something personal for him.”

In calling for the mobilization, Putin cited the length of the front line, which he said exceeds 1,000 kilometers (more than 620 miles). He also said Russia is effectively fighting the combined military might of Western countries.

Western leaders said the mobilization was in response to Russia’s recent battlefield losses in Ukraine.

U.S. national security council spokesperson John Kirby said Putin’s speech is “definitely a sign that he’s struggling.”

Russian rockets launched against Ukraine from Russia’s Belgorod region are seen at dawn in Kharkiv, Ukraine, Wednesday, Sept. 21, 2022. (AP Photo/Vadim Belikov)

President Joe Biden told the U.N. General Assembly: “We will stand in solidarity against Russia’s aggression, period.” He said Putin’s new nuclear threats against Europe showed “reckless disregard” for Russia’s responsibilities as a signer of the Treaty on the Non-Proliferation of Nuclear Weapons.

Zelenskyy was due to speak to the gathering in a prerecorded address later Wednesday. Putin is not attending.

Russian opposition leader Alexei Navalny said the mobilization meant the war “is getting worse, deepening, and Putin is trying to involve as many people as possible. … It’s being done just to let one person keep his grip on personal power.”

The partial mobilization order came a day before Russian-controlled regions in eastern and southern Ukraine plan to hold referendums on becoming integral parts of Russia — a move that could allow Moscow to escalate the war. The referendums will start Friday in the Luhansk, Kherson and partly Russian-controlled Zaporizhzhia and Donetsk regions.

The balloting is all but certain to go Moscow’s way. Foreign leaders are already calling the votes illegitimate and nonbinding. Ukrainian President Volodymyr Zelenskyy said they were a “sham” and “noise” to distract the public.

Michael Kofman, head of Russian studies at the CNA think tank in Washington, said Putin has staked his regime on the war, and that annexation “is a point of no return,” as is mobilization “to an extent.”

“Partial mobilization affects everybody. And everybody in Russia understands … that they could be the next wave, and this is only the first wave,” Kofman said.

Russian Defense Minister Sergei Shoigu said only some of those with relevant combat and service experience will be mobilized. He said about 25 million people fit that criteria, but only about 1% of them will be mobilized.

It wasn’t clear how many years of combat experience or what level of training soldiers must have to be mobilized. Another key clause in the decree prevents most professional soldiers from terminating their contracts until after the partial mobilization.

Putin’s mobilization gambit could backfire by making the war unpopular at home and hurting his own standing. It also concedes Russia’s underlying military shortcomings.

A Ukrainian counteroffensive this month seized the military initiative from Russia and captured large areas in Ukraine from Russian forces.

The Russian mobilization is unlikely to produce any consequences on the battlefield for months because of a lack of training facilities and equipment.

Russian political analyst Dmitry Oreshkin said it seemed “an act of desperation.”

“People will evade this mobilization in every possible way, bribe their way out of this mobilization, leave the country,” he said.

He described the announcement as “a huge personal blow to Russian citizens, who until recently (took part in the hostilities) with pleasure, sitting on their couches, (watching) TV. And now the war has come into their home.”

In his address, Putin accused the West of engaging in “nuclear blackmail” and cited alleged “statements of some high-ranking representatives of the leading NATO states about the possibility of using nuclear weapons of mass destruction against Russia.”

He didn’t elaborate.

“When the territorial integrity of our country is threatened, to protect Russia and our people, we will certainly use all the means at our disposal,” Putin said.

In other developments Wednesday, relatives of two U.S. military veterans who disappeared while fighting Russia with Ukrainian forces said they had been released after about three months in captivity. They were part of a swap arranged by Saudi Arabia of 10 prisoners from the U.S., Morocco, the United Kingdom, Sweden and Croatia.