Under regulations prescribed by the Secretary, an enlisted member may be detained in the Coast Guard beyond the term of his enlistment:
(1)
until the first arrival of the vessel on which he is serving at its permanent station, or at a port in a State of the United States or in the District of Columbia; or
(2)
if attached to a shore station beyond the continental limits of the United States or in Alaska, until his first arrival at a port in any State of the United States or in the District of Columbia where his reenlistment or discharge may be effected, or until he can be discharged or reenlisted at his station beyond the continental limits of the United States or in Alaska, whichever is earlier, but in no event to exceed three months; or
(3)
during a period of war or national emergency as proclaimed by the President, and, in the interest of national defense, for a period not to exceed six months after the end of the war or the termination of the emergency; or
(4)
for a period of not exceeding thirty days in other cases whether or not specifically covered by this section, when essential to the public interests, and the determination that such detention is essential to the public interests, made in accordance with regulations prescribed by the Secretary, shall be final and conclusive.
Any member detained in the Coast Guard as provided in this section shall be entitled to receive pay and allowances and benefits under the same conditions as though his enlistment period had not expired, and shall be subject in all respects to the laws and regulations for the government of the Coast Guard until his discharge therefrom. Enlisted members detained under the provisions of clause (1) shall be entitled to the pay and allowances provided for enlisted personnel of the Navy detained under similar circumstances.