Egzempcja wojskowa was the soldier's legal immunity in Polish–Lithuanian Commonwealth of 16th-17th century.
Military exemptions allow to evaluate the legal position of mercenary soldiers, functioning of legal norms of a temporary character and the interrelations between the statutory law and customary law in Poland.
As a consequence of the advancing paralysis of the parliament’s works, the exemptions issued by hetman became more and more common.
This enhanced the attractiveness of military service and prevented soldiers from leaving the army.
The parliament, depending on the circumstances, enlarged or limited the group of the beneficiaries, applied more or less strict criteria, changed the time limits of the exemptions’ validity, prevented their abuse, and most importantly, it firmly opposed a rejection of the releases by courts.