Immunity from prosecution is a doctrine of international law that allows an accused to avoid prosecution for criminal offences. Immunities are of two types. The first is functional immunity, or immunity ratione materiae. This is an immunity granted to people who perform certain functions of state. The second is personal immunity, or immunity ratione personae. This is an immunity granted to certain officials because of the office they hold, rather than in relation to the act they have committed.