The fact that acts done for the state have involved conduct which is criminal does not remove the immunity. Indeed the whole purpose of the residual immunity ratione materiae [that is, as a function of his having held that office] is to protect the former head of state against allegations of such conduct after he has left office. A head of state needs to be free to promote his own state's interests during the entire period when he is in office without being subjected to the prospect of detention, arrest or embarrassment in the foreign legal system of the receiving state. The conduct does not have to be lawful to attract the immunity.
It may be said that it is not one of the functions of a head of state to commit acts which are criminal according to the laws and constitution of his own state or which customary international law regards as criminal. But I consider that this approach to the question is unsound in principle. The principle of immunity ratione materiae protects all acts which the head of state has performed in the exercise of the functions of government. The purpose for which they were performed protects these acts from any further analysis.
There are only two exceptions to this approach which customary international law has recognised. The first relates to criminal acts which the head of state did under the colour of his authority as head of state but which were in reality for his own pleasure or benefit. The examples which Lord Steyn gave of the head of state who kills his gardener in a fit of rage or who orders victims to be tortured so that he may observe them in agony seem to me plainly to fall into this category and, for this reason, to lie outside the scope of the immunity. The second relates to acts the prohibition of which has acquired the status under international law of jus cogens [compelling law]. This compels all states to refrain from such conduct under any circumstances and imposes an obligation erga omnes [for everyone] to punish such conduct. As Sir Arthur Watts QC said, in respect of conduct constituting an international crime, such as war crimes, special considerations apply.