Will Russian President Vladimir Putin’s military overrun Ukraine like Adolf Hitler’s army overran France in 1940, or will Kyiv become Mr. Putin’s Stalingrad? Ukraine’s armed population could play an increasingly decisive role, from house-to-house fighting in the cities to guerilla strikes in the countryside. In the United States, Second Amendment supporters see Ukrainian resistance as exemplifying the virtues of an armed citizenry, while detractors are aghast at the implications.

On Feb. 23, as Russian troops stood poised to attack, the Ukrainian Parliament (Verkhovna Rada) passed a law granting citizens the right to carry firearms for self-defense outside their homes. Ukrainians could buy AR-15 and AK-47 semi-automatic rifles.

When Russia launched its attack on Ukraine the following day, Ukrainian President Volodymyr Zelenskyy—who previously resisted liberalizing firearm laws—directed that any citizen who wanted to defend the country would be given a weapon. More than 25,000 automatic rifles reportedly were distributed in Kyiv alone.

Ukrainians obviously have no wish to be part of Mother Russia. In the “Holodomor,” the Soviet-induced famine of 1932-33, Stalin exterminated 7 to 12 million Ukrainians. Many thought the Germans would be liberators when they attacked in 1941, only to find that the Nazis regarded all Slavs as “Untermensch” (subhuman). Some would fight against both the Nazis and the Reds. The Ukrainian Insurgent Army continued to fight the Communists until 1950.

When the Soviet Union dissolved in 1991, Ukraine inherited Soviet restrictions on gun ownership, including strict licensing and registration requirements. Ukraine reported in 1997 that 722,739 civilians had registered firearms. According to GunPolicy.org, that left “uncounted a national stockpile of 1.5 million to 5.5 million undocumented, illicit small arms.” Illicit? When the state denies the right to have arms, subjects will do what is necessary to defend themselves. Should Mr. Putin win the current aggression, those with registered guns will be hunted down. Hunting down “undocumented” gun owners won’t be so easy.

As late as 2018, there were 892,854 registered firearms in Ukraine, compared to an estimated 3.5 million “illegal” firearms. This is the same pattern in states like California and New York, where laws requiring the registration of so-called “assault weapons” are largely ignored.

Ukraine has been the only European nation with no actual firearm statutes, though the Ministry of Internal Affairs, in 1998—seven years after independence—issued Order No. 622, which gave government officials discretion to decide who could obtain or carry firearms. Under this corrupt practice, officials gave hundreds of thousands of firearms to their friends in the elite.

Despite this aberration, Ukraine had been gravitating toward Western values and away from Russian domination. In 2013, Ukraine’s oldest law journal, the Law of Ukraine, published an issue on the U.S. Bill of Rights. Having read my book, “The Founders’ Second Amendment,” the editor invited me to contribute an article on the subject. George Mason University Law Prof. Joyce Lee Malcolm, author of “To Keep and Bear Arms,” also was featured.

Support was growing for liberalized gun laws at that time. The Ukrainian Gun Owners Association and some political parties were demanding action. My article highlighted the right to arms as the mark of a free people. Referring to “the advantage of being armed, which the Americans possess over the people of almost every other nation,” James Madison wrote that the European monarchies “are afraid to trust the people with arms.”

In this period, Mr. Putin was promoting agitation over Crimea. On Feb. 22, 2014, the Rada ousted President Viktor Yanukovych, a long-time Soviet apparatchik who fled to Russia. The Rada then elected Oleksandr Turchynov as its chair, who immediately proposed a constitutional amendment that included the following three clauses.

First, military training was required for all able-bodied citizens.

Second, everyone had the right to defend their constitutional rights against the usurpation of power or encroachment on the sovereignty of Ukraine.

And third: “Every citizen of Ukraine has the right to possess firearms to protect his life and health, house and property, the life and health of others, constitutional rights and freedoms in case of usurpation of power, and encroachments on the constitutional order, sovereignty and territorial integrity of Ukraine.”

That broad language expressed the ideals held by our Founders, which found more concise expression in the Second Amendment. The Ukrainians seem to have improved on James Madison’s draftsmanship.

Mr. Putin did not recognize the legitimacy of the new government, and four days later, on Feb. 26, 2014, Russian troops invaded Crimea. Mr. Turchynov, who was also acting prime minister and commander of the Ukrainian Armed Forces, fought back against Russian surrogates engaged in terrorist activities. Still, Ukrainian forces were no match for the Russians and their toadies.

Mr. Putin hasn’t forgotten. Just days ago, amid the current invasion, Pravda called for bringing Mr. Turchynov to justice for his supposed “war crimes.”

Russia’s military annexation of Crimea brought the reform efforts to a halt, and the proposed constitutional amendment was not acted on. Only when the current invasion appeared imminent did the Rada enact a liberalized gun law, and the government handed out countless firearms to citizens.

When Nazi Germany overran France in 1940, Nazi military officials posted notices that all who failed to turn in their firearms within 24 hours would be executed. French police had gun registration records, making it convenient for the Germans to find the “legal” gun owners. But many Frenchmen had not registered their guns and, despite daily reports of executions, hid them. The arms would be used by the Resistance.

I can’t be sure if Mr. Putin’s invaders have been posting similar notices, but now would be a good time for Ukrainian police to burn their gun registration records. Those who never registered won’t have that specific worry.

While the 2014 constitutional amendment was not adopted, many Ukrainians now possess arms for the very purpose our Second Amendment was enacted: so citizens can protect their freedom, the sovereignty and territorial integrity of their country, and their lives and those of their families and countrymen.

So, next time you hear U.S. politicians propose restrictions on Second Amendment rights, you’ll know what to tell them: Remember Ukraine.