Any person who, after notice and an opportunity for a hearing, is found to have failed to comply with the requirements of section
2716 of this title or the regulations issued under that section, or with a denial or detention order issued under subsection (c)(2) of that section, shall be liable to the United States for a civil penalty, not to exceed $25,000 per day of violation. The amount of the civil penalty shall be assessed by the President by written notice. In determining the amount of the penalty, the President shall take into account the nature, circumstances, extent, and gravity of the violation, the degree of culpability, any history of prior violation, ability to pay, and such other matters as justice may require. The President may compromise, modify, or remit, with or without conditions, any civil penalty which is subject to imposition or which had been imposed under this paragraph. If any person fails to pay an assessed civil penalty after it has become final, the President may refer the matter to the Attorney General for collection.