Whenever any foreign country whose vessels have been placed on the same footing in the ports of the United States as American vessels (the coastwise trade excepted) shall deny to any vessels of the United States any of the commercial privileges accorded to national vessels in the harbors, ports, or waters of such foreign country, the President, on receiving satisfactory information of the continuance of such discriminations against any vessels of the United States, is authorized to issue his proclamation excluding, on and after such time as he may indicate, from the exercise of such commercial privileges in the ports of the United States as are denied to American vessels in the ports of such foreign country, all vessels of such foreign country of a similar character to the vessels of the United States thus discriminated against, and suspending such concessions previously granted to the vessels of such country; and on and after the date named in such proclamation for it to take effect, if the master, officer, or agent of any vessel of such foreign country excluded by said proclamation from the exercise of any commercial privileges shall do any act prohibited by said proclamation in the ports, harbors, or waters of the United States for or on account of such vessel, such vessel, and its rigging, tackle, furniture, and boats, and all the goods on board, shall be liable to seizure and to forfeiture to the United States; and any person opposing any officer of the United States in the enforcement of this section, or aiding and abetting any other person in such opposition, shall forfeit $800, and shall be guilty of a misdemeanor, and, upon conviction, shall be liable to imprisonment for a term not exceeding two years.