Ley de fugas
The application of the  (Spanish for 'Law for escapes') is a type of execution that consists of simulating or provoking an attempted escape of a prisoner and then killing them for "attempting to escape prison". It is used to justify an otherwise extrajudicial execution. History

Spain 
In Spain, the method of execution of "fugitives", later known as Ley de fugas, was implemented in Catalonia by Brigadier Antoine de Roten, governor of Barcelona, in the persecution against the absolutist groups during Trienio Liberal. According to Vicente de la Fuente's description of the method:
It was later applied against Andalusian banditry in the 19th century. During the Restoration (1874-1931) the governments favored the dirty war against the trade union movement and allowed the civil governor of Barcelona, General Severiano Martínez Anido, through the Civil Guard and gunmen of Sindicato Libre (a company union), to order eight hundred attacks that produced more than five hundred deaths among various anarcho-syndicalists of the CNT (among them, prominent figures such as Salvador Seguí or Evelio Boal), according to figures from Martínez Anido himself; the actual figures were therefore probably higher. In fact, the future dictator Miguel Primo de Rivera justified the use of state terrorism in a 1920 letter to the then president of the Spanish government Eduardo Dato: "I understand that the defense instinct seeks extralegal means... A raid, a transfer, an attempt leak and a few shots will begin to solve the problem.”

Many intellectuals and writers attacked this inhuman disposition, such as Ramón María del Valle-Inclán in a couple of scenes added to the second edition (1924) of his grotesque Luces de Bohemia, through the character of the Catalan anarchist Mateo, prisoner executed by this form. The procedure is also mentioned in the film La sombra de la ley (Gun City), by Dani de la Torre (2018). During the Spanish Civil War (1936-1939), this procedure was also euphemistically called "taking a walk", since the prisoner was told that he was allowed to "take a walk" before shooting him. Soon, prisoners began to discover this trick and they refused to go for a walk. From then on they were shot in the back, without further ado. To give the political assassination an appearance of legality, the usual procedure was the falsification of a complaint of disaffection to the side that committed the execution. This was often achieved by force, through torture or blackmail of other detainees. The law continued to be used during francoist dictatorship, particularly for the repression of the republican maquis guerrillas. More widely, it was used against those who held ideological positions other than National Catholicism and could not be sentenced to death by judicial means. Mexico 
During the dictatorship of Porfirio Díaz (1876-1911), the law published on January 25, 1867 by the government of Benito Juárez (also called Ley de fugas) was used as a repressive method to eliminate a person or a group of people revolting against the president. Most of the victims were common criminals (their number is estimated at more than 10,000) who lived in the countryside, where the Rural Police Corps operated. During some disturbances in Veracruz, Porfirio Díaz sent a telegram to Luis Mier y Terán, governor of the State, ordering him: "Kill them hot", in the sense that the prisoners be given facilities to escape and use the escape attempt as a pretext to shoot them. The custom, inherited from colonial times, continued in use during and after the 1910 Revolution and was also used in the Cristeros War (1926-1929). Nazi Germany 
The Gestapo, secret Nazi police, also used this procedure in World War II to execute Allies prisoners who had tried to escape from concentration camps and had been recaptured. A historical illustration of this fact appears in the film The Great Escape, by John Sturges (1963), inspired by real events: the escape by fifty Allied soldiers from the German concentration camp of Stalag Luft III. References 

White Terror (Spain)
Restoration (Spain)
Execution methods
Extrajudicial killings by type