These privileges were demanded by the szlachta as a compensation for their participation in the Thirteen Years' War.