intervened personally in matters of local legal matters, overriding local charters and customs. This practice was often met with irony and scorn from local councils, who wanted to protect local codes. Maximilian had a general reputation of justice and clemency, but could occasionally act in a violent and resentful manner if personally affronted. In 1499, as the ruler of Tyrol, he introduced the Maximilianische Halsgerichtsordnung (the Penal Code of Maximilian). This was the first codified penal law in the German speaking world. The law attempted to introduce regularity into contemporary discrete practices of the courts. This would be part of the basis for the Constitutio Criminalis Carolina established under Charles V in 1530. Regarding the use of torture, the court needed to decide whether someone should be tortured. If such a decision was made, three council members and a clerk should be present and observe whether a confession was made only because of the fear of torture or the pain of torture, or that another person would be harmed. During the Austrian-Hungarian war (1477–1488), Maximilian's father Frederick III issued the first modern regulations to strengthen military discipline. In 1508, using this ordinance as the basis, Maximilian devised the first military code ("Articles"). This code included 23 articles. The first five articles prescribed total obedience to imperial authority. Article 7 established the rules of conduct in camps. Article 13 exempted churches from billeting while Article 14 forbade violence against civilians: "You shall swear that you will not harm any pregnant women, widows and orphans, priests, honest maidens and mothers, under the fear of punishment for perjury and death". These actions that indicated the early developments of a "military revolution" in European laws had a tradition in the Roman concept of a just war and ideas of sixteenth-century scholars, who developed this ancient doctrine with a main thesis which advocated that war was a matter between two armies and thus the civilians (especially women, children and old people) should be given immunity. The code would be the basis for further ordinances by Charles V and new "Articles" by Maximilian II (1527–1576), which became the universal military code for the whole Holy Roman Empire until 1642. The legal reform seriously weakened the ancient Vehmic court (Vehmgericht, or Secret Tribunal of Westphalia, traditionally held to be instituted by Charlemagne but this theory is now considered unlikely), although it would not be abolished completely until