27. (1) Where a person subject to naval law commits an offence and thereafter ceases to be a person subject to naval law, he may be taken into and kept in naval custody and be tried and punished for that offence in like manner as he might have been taken into and kept in naval custody and tried and punished if he had continued to be a person subject to naval law:
Provided that, after the lapse of six months from the date of the commission of such offence, he shall not be tried for such offence unless such offence is the offence of mutiny or desertion.
(2) Where a person subject to naval law is sentenced by a court-martial or by a naval officer exercising judicial powers under this Act to imprisonment or detention for any offence and thereafter ceases to be a person subject to naval law, he may, during his imprisonment or detention, be dealt with as if he had continued to be a person subject to naval law. *Trial and punishment of offenders who have ceased to be subject to naval law.*