(a) In General.—No vessel that is subject to chapter 37 shall operate in the navigable waters of the United States or transfer cargo or residue in any port or place under the jurisdiction of the United States, if such vessel—
has a history of accidents, pollution incidents, or serious repair problems that, as determined by the Secretary, creates reason to believe that such vessel may be unsafe or may create a threat to the marine environment;
fails to comply with any applicable regulation issued under section 70034, chapter 37, or any other applicable law or treaty;
discharges oil or hazardous material in violation of any law of the United States or in a manner or quantities inconsistent with any treaty to which the United States is a party;
is manned by one or more officers who are licensed by a certificating State that the Secretary has determined, pursuant to section 9101 of title 46, does not have standards for licensing and certification of seafarers that are comparable to or more stringent than United States standards or international standards that are accepted by the United States;
is not manned in compliance with manning levels as determined by the Secretary to be necessary to insure the safe navigation of the vessel; or
(1) In general.—
The Secretary may allow provisional entry of a vessel that is not in compliance with subsection (a), if the owner or operator of such vessel proves, to the satisfaction of the Secretary, that such vessel is not unsafe or a threat to the marine environment, and if such entry is necessary for the safety of the vessel or persons aboard.
(2) Provisions not applicable.—
Paragraphs (1), (2), (3), and (4) of subsection (a) of this section shall not apply to a vessel allowed provisional entry under paragraph (1) if the owner or operator of such vessel proves, to the satisfaction of the Secretary, that such vessel is no longer unsafe or a threat to the marine environment, and is no longer in violation of any applicable law, treaty, regulation, or condition, as appropriate.