This type of immunity arises from customary international law and treaty law and confers immunities on those performing acts of state (usually a foreign official). Any person who in performing an act of state commits a criminal offence is immune from prosecution. This is so even after the person ceases to perform acts of state. Thus it is a type of immunity limited in the acts to which it attaches (acts of state) but will only end if the state itself ceases to exist. This type of immunity is based on respect for sovereign equality and state dignity.
The offices usually recognised as attracting this immunity are Head of State or Head of Government, senior cabinet members, Foreign Minister, and Minister for Defence: see the Arrest Warrant Case,Pinochet Case (R v Bow Street Magistrates; ex parte Pinochet Ugarte (No 3)  1 AC 147, House of Lords). Such officers are immune from prosecution for everything they do during their time in office. For example, an English court held that a warrant could not be issued for the arrest of Robert Mugabe on charges of international crimes on the basis that he was a presently serving Head of State at the time the proceedings were brought: Mugabe, reported at (2004) 53 ICLQ 789.
Other examples are the attempts to prosecute Fidel Castro in Spain and Jiang Zemin in the USA. However, the moment accused leaves office, they are liable to be prosecuted for crimes committed before or after their term in office, or for crimes committed whilst in office in a personal capacity (subject to jurisdictional requirements and local law). Pinochet was only able to come to trial because Chile and the UK had both signed and ratified the UN Convention Against Torture through which such immunities were waived.
It may be the case that personal immunity is itself being eroded. In 2004 the Appeals Chamber of the Special Court for Sierra Leone held that indicted Liberian president Charles Taylor could not invoke his Head of State immunity to resist the charges against him, even though he was an incumbent Head of State at the time of his indictment. However, this reasoning was based on the construction of the court's constituent statute, that dealt with the matter of indicting state officials. In any case, Taylor had ceased to be an incumbent Head of State by the time of the court's decision so the arresting authorities would have been free to issue a fresh warrant had the initial warrant been overturned.
Nevertheless, this decision may signal a changing direction in international law on this issue. Recent developments in international law suggest that this type of immunity, whilst it may be available as a defence to prosecution for local or domestic crimes or civil liability, is not a defence to an international crime. (International crimes include crimes against humanity, war crimes, and genocide).
This has developed in the jurisprudence of the International Criminal Tribunal for the Former Yugoslavia, particularly in the Karadzic, Milosevic, and Furundzija cases (though care should be taken when considering ICTY jurisprudence due to its Ad-hoc nature). This was also the agreed position as between the parties in their pleadings in the International Court of Justice Case Concerning the Arrest Warrant of 11 April 2000 (Democratic Republic of the Congo v. Belgium).
The reasons commonly given for why this immunity is not available as a defense to international crimes is straight forward: (1) that is genocide, war crimes and crimes against humanity are not acts of state. Criminal acts of the type in question are committed by human actors, not states; and (2) we cannot allow the jus cogens nature of international crimes, i.e. the fact that they are non-derogable norms, to be eroded by immunities.
However, the final judgment of the ICJ regarding immunity may have thrown the existence of such a rule limiting functional immunities into doubt. See in this respect the criticism of the ICJ's approach by Wouters, Cassese and Wirth among others, though some such as Bassiouni claim that the ICJ affirmed the existence of the rule. Regarding claims based on the idea that a senior state official committing International crimes can never be said to be acting officially, as Wouters notes “This argument, however, is not waterproof since it ignores the sad reality that in most cases those crimes are precisely committed by or with the support of high-ranking officials as part of a state’s policy, and thus can fall within the scope of official acts.”
Academic opinion on the matter is divided and indeed only the future development of International Customary law, possibly accelerated by states exercising universal jurisdiction over retired senior state officials, will be able to confirm whether state sovereignty has now yielded partially to internationally held human rights values. In November 2007, French prosecutors refused to press charges against former US Secretary of Defense Donald Rumsfeld for torture and other alleged crimes committed during the course of the US invasion of Iraq, on the grounds that heads of state enjoyed official immunity under customary international law, and they further claimed that the immunity exists after the official has left office.