Customs Consolidation Act, 1876

Officers of army, &c. may patrol coasts without being liable to action.

196. Any officer of the army, navy, marines, or coastguard being duly employed for the prevention of smuggling and on full pay, or any officer of Customs, or any person acting in his aid, or duly employed for the prevention of smuggling, when on duty, may patrol upon and pass freely along and over any part of the coasts of the United Kingdom, or any railway, or the shores or banks of any river, creek, or inlet of the same (not being a garden or pleasure ground); and any such officer or person so patrolling shall not be liable to any indictment, action, or suit for so doing.