|This article is about the current version of DF.|
The fortress guard is the military squad in charge of delivering justice within a fort. Headed by the captain of the guard, the fortress guard is otherwise completely identical to a standard military squad, and can be treated as such. The fortress guard, once available, is always listed as the first squadron in your list of military units (including when you haven't got any guards - then it'll be either an empty squad or a not-created squad with no shown positions at all). It can be equipped like any other unit, given a schedule and assigned to barracks for training.
As the agents of dwarven justice, the fortress guard is responsible for dragging dwarves to jail and for the application of beatings, which typically are doled out when not enough chains and cages are available. Your fortress guard can therefore easily end up badly hurting an innocent dwarf whose only crime was carrying a good to the trading post that was forbidden for exports after the caravan had already left the fortress.
To prevent excessive harm from the justice system, you should make sure there's enough holding space in your jails so that jail sentences aren't "downgraded" to beatings. In addition, you could select unusually weak soldiers and never assign them a barracks to train in. This should keep them too weak and clumsy to pulp a dwarven head with a single punch even if a beating is ordered after all. Their equipment should not matter: fortress guards who deliver a beating will unwield any weapon they might have in their hand. There have been no substantiated reports of beatings performed with weapons since DF 0.34.11, but you might want not to give your fortress guard steel battleaxes, just to be on the safe side.
Alternatively, you can simply not create a fortress guard and deal with possible crimes without falling back on dwarven justice. An existing guard can be dissolved, disabling the justice system again.
 See also
|"Fortress guard" in other Languages