Pursuant to section 1629 of this title and section 1103(a)(7) of title 8, and provided that an aviation security preclearance agreement (as defined in section 44901(d)(4)(B) 1 of title 49) is in effect, the Secretary may establish and maintain U.S. Customs and Border Protection preclearance operations in a foreign country—

(1) to prevent terrorists, instruments of terrorism, and other security threats from entering the United States;

(2) to prevent inadmissible persons from entering the United States;

(3) to ensure that merchandise destined for the United States complies with applicable laws;

(4) to ensure the prompt processing of persons eligible to travel to the United States; and

(5) to accomplish such other objectives as the Secretary determines are necessary to protect the United States.