written notice. In determining the amount of such penalty, the Secretary shall take into account the nature, circumstances, extent, and gravity of the prohibited acts committed and, with respect to the violator, the degree of culpability, any history of prior offenses, ability to pay, and such other matters as justice may require. (2) Compromise, modification, or remission The Secretary may compromise, modify, or remit, with or without conditions, any civil penalty that is subject to imposition or that has been imposed under this section. (3) Failure to pay penalty If any person fails to pay an assessment of a civil penalty after it has become final, the Secretary may refer the matter to the Attorney General of the United States, for collection in any appropriate district court of the United States. (b) Criminal penalty (1) Class D felony Any person who willfully and knowingly violates this chapter or any regulation issued hereunder commits a class D felony. (2) Class C felony Any person who, in the willful and knowing violation of this chapter or of any regulation issued under this chapter, uses a dangerous weapon, or engages in conduct that causes bodily injury or fear of imminent bodily injury to any officer authorized to enforce the provisions of this chapter or the regulations issued under this chapter, commits a class C felony. (c) In rem liability Any vessel that is used in violation of this chapter, or any regulations issued under this chapter, shall be liable in rem for any civil penalty assessed pursuant to subsection (a) and may be proceeded against in the United States district court for any district in which such vessel may be found. (d) Injunction The United States district courts shall have jurisdiction to restrain violations of this chapter or of regulations issued under this chapter, for cause shown. (e) Denial of entry Except as provided in section 70021, the Secretary may, subject to recognized principles of international law, deny entry by any vessel that is not in compliance with this