5. Where action is taken pursuant to this article, the Parties concerned shall take due account of the need not to endanger the safety of life at sea, the security of the vessel and the cargo or to prejudice the commercial and legal interests of the flag State or any other interested State.