The Commercial Port Law Article 60

When foreign merchant ships seriously violate control examination regulations, influence ship navigation safety of ship personnel, and can seriously threaten marine environment, the Maritime and Port Bureau shall retain ships until improvements are completed, in order for them to be approved to navigate.Where foreign merchant ships violate control examination regulations but our country does not possess the facilities to force the ship conform to the regulations and there is the possibility that retaining the ship will have an affect on port safety or public interests, then the ship will be allowed to leave subject to approval from the Maritime and Port Bureau after issuing a certificate by ship classification register institute .
中文原文 商港法第60條
外國商船違反管制檢查規定,情節嚴重,有影響船舶航行、船上人員安全之虞或足以對海洋環境產生嚴重威脅之虞者,航港局得將其留置至完成改善後,始准航行。
外國商船違反管制檢查規定,我國無修繕設備技術、無配件物料可供更換或留置違法船舶將影響港口安全或公共利益者,得經入級驗船機構出具證明,並獲航港局同意後航行。

English translation for reference only; the Chinese text prevails. Not legal advice.