For more than two decades it has been standard practice in Russia: New conscripts doing mandatory military service have not been deployed on the front lines. It is codified in law and embraced by all parents hoping to keep their sons from the carnage of war.

But Ukraine’s lightning incursion into the southwestern Russia region of Kursk has upended that compact.

When Ukrainian troops poured into Russia on Aug. 6, Moscow was caught unawares. Suddenly, the war had come to the conscripts, who were manning lightly guarded positions near the border.

Hundreds of conscripts were captured, while scores are missing and potentially dead.

Military deployment has been a sensitive issue for President Vladimir V. Putin. Moscow’s decision to thrust young, untrained soldiers onto the battlefields of Afghanistan and Chechnya helped to cement domestic opposition that compelled the Kremlin to end those conflicts.

So during the chaotic early days of Russia’s invasion of Ukraine in February 2022, when it was discovered that several hundred newly drafted soldiers were in units that crossed the border, the president ordered military commanders to send them home.

“Only professional military personnel will carry out the assigned tasks,” Mr. Putin said on national television at the time.