Whenever merchandise is imported into the United States by sea for immediate exportation to a foreign port by sea, or by a river, the right to ascend or descend which for the purposes of commerce is secured by treaty to the citizens of the United States and the subjects of a foreign power, the Secretary of the Treasury is authorized to prescribe regulations for the transshipment and transportation of such merchandise.