# § 462. Compelling foreign vessels to depart
It shall be lawful for the President to employ such part of the land or naval forces of the United States, or of the militia thereof, as he may deem necessary to compel any foreign vessel to depart from the United States or any of its possessions in all cases in which, by the law of nations or the treaties of the United States, it ought not to remain, and to detain or prevent any foreign vessel from so departing in all cases in which, by the law of nations or the treaties of the United States, it is not entitled to depart.
---
**Source Credit**: (Mar. 4, 1909, ch. 321, § 15, 35 Stat. 1091; June 15, 1917, ch. 30, title V, § 10, 40 Stat. 223.)
## Editorial Notes
### Codification
Section was formerly classified to prior to the general revision and enactment of Title 18, Crimes and Criminal Procedure, by , .
Act , inserted provisions relating to detention of vessels.
### Prior Provisions
Section was derived from R.S. § 5288 (, ), which was repealed by , .