Under customary international law, a serving head of state generally has immunity from the criminal jurisdiction of foreign courts so they can perform diplomatic duties without fear of arrest. The protection is strongest for sitting leaders and weaker for former officials or for acts a court treats as private crimes rather than official functions. In U.S. courts, immunity often turns on whether the executive branch and State Department recognize the person as a legitimate head of state. In United States v. Noriega, courts denied immunity partly because the State Department did not recognize Noriega as Panama's leader and the alleged acts were plainly illegal.