A control scheme for the immunisation of susceptibles in the Kermack-McKendrick epidemic model for a closed population is proposed. The bounded control appears linearly in both dynamics and integral cost functionals and any optimal policies are of the “bang-bang” type. The approach uses Dynamic Programming and Pontryagin's Maximum Principle and allows one, for certain values of the cost and removal rates, to apply necessary and sufficient conditions for optimality and show that a one-switch candidate is the optimal control. In the remaining cases we are still able to show that an optimal control, if it exists, has at most one switch.