A foreign railroad, whose road enters the United States by ferry, tugboat, or towboat, may own and operate a vessel not having a coastwise endorsement in connection with the water transportation of the passenger, freight, express, baggage, and mail cars used by that road, together with the passengers, freight, express matter, baggage, and mails transported in those cars. However, the foreign railroad is subject to the same restrictions imposed by law on a vessel of the United States entering a port of the United States from the same foreign country. Except as otherwise authorized by this chapter, the ferry, tugboat, or towboat may not, under penalty of forfeiture, be used in the transportation of merchandise between ports or places in the United States to which the coastwise laws apply.