The deputy health minister denied the MoD was being treated as a special case and said it was because of the nature of the vessels.

"In the same way as for offshore oil and gas installations, we do not want to prohibit people from smoking indoors if it creates a risk that they will smoke far more hazardously out of doors," he said.

"Likewise a submarine at sea is quite a difficult place to go on deck for a sly puff - we would want to avoid that."

Committee convener Roseanna Cunningham, who said she envisaged "smoke periscopes", then asked Mr Macdonald how the workplace ban would affect corridors connecting churches with the homes of ministers or priests.

'Fly fags'

She suggested this was often where the vestments were put on before services, adding: "Some denominations leave their clerics little to enjoy except the occasional cigarette."

Mr Macdonald said if the corridor or connecting room was accessible to people other than those living in the residence it would be covered by the ban.