Barrier troops, blocking units, or anti-retreat forces are military units that are located in the rear or on the front line (behind the main forces) to maintain military discipline, prevent the flight of servicemen from the battlefield, capture spies, saboteurs and deserters, and return troops who flee from the battlefield or lag behind their units.
According to research by Jason Lyall, barrier troops are more likely to be used by the militaries of states that discriminate against the ethnic groups that comprise the state's military.
During the Battle of Nanking of the Second Sino-Japanese War, a battalion in the New 36th Division of the National Revolutionary Army (NRA) was stationed at the Yijiang Gate with orders to guard the gate and "let no one through". On 12 December 1937, the NRA collapsed in the face of an offensive by the Imperial Japanese Army (IJA), and various units attempted to retreat without orders through the gate. The battalion responded by opening fire and killing a large number of the retreating NRA units and fleeing civilians.
In the Red Army of the Russian SFSR and later the Soviet Union, the concept of barrier troops first arose in August 1918 with the formation of the заградительные отряды (zagraditelnye otriady), translated as "blocking troops" or "anti-retreat detachments" ( заградотряды, заградительные отряды, отряды заграждения). The barrier troops comprised personnel drawn from the Cheka secret police punitive detachments or from regular Red Army infantry regiments.
The first use of the barrier troops by the Red Army occurred in the late summer and fall of 1918 in the Eastern front during the Russian Civil War, when People's Commissar of Military and Naval Affairs (War Commissar) Leon Trotsky of the Communist Bolshevik government authorized Mikhail Tukhachevsky, the commander of the 1st Army, to station blocking detachments behind unreliable Red Army infantry regiments in the 1st Red Army, with orders to shoot if front-line troops either deserted or retreated without permission.