The Nieszawa Statutes also curbed the power of the magnates, as the Sejm (national parliament) received the right to elect many officials, including judges, voivods and castellans.