The bill would allow some foreigners to sue the U.S. government if their personal data is unlawfully disclosed

WASHINGTON — President Barack Obama signed legislation Wednesday that would extend some U.S. privacy protections to citizens of allied countries and let foreigners sue the U.S. government if their personal data is unlawfully disclosed.

In a separate ceremony just a few minutes later, Obama signed into law a bill that beefs up trade enforcement and includes a ban on Internet access taxes.

Obama said both bills had bipartisan support. The bill extending certain privacy protections was aimed at shoring up trust among European allies following leaks by former National Security Agency contractor Edward Snowden.

Obama said the new law makes sure data is protected under U.S. privacy laws, “not only American citizens, but also foreign citizens.” Even as the U.S. government works to protect American’s security, Obama said “we’re mindful of the privacy that we cherish so much.”

Supporters say extending privacy protections helps ensure that other nations will continue sharing law enforcement data with the United States.

Obama is trying to build support for a trade agreement called the Trans-Pacific Partnership, and during the second bill signing ceremony, he sought to emphasize that his administration is vigorously taking on countries that violate free trade law. He said the bill will provide more resources to boost trade enforcement efforts and streamline the process for fighting the illegal dumping of goods.

Businesses groups have said the legislation would cut down on paperwork needed to ship goods, lowering the cost of doing business and helping consumers.

Obama did not focus on the aspect of the bill that has gained the most attention, the ban on Internet access taxes.

Until now, states that imposed Internet access taxes have been allowed to continue. Under the legislation Obama signed, those states would have to phase out their taxes by the summer of 2020.

Seven states — Hawaii, New Mexico, North Dakota, Ohio, South Dakota, Texas and Wisconsin — have been collecting a combined $563 million yearly from Internet access taxes, according to information gathered by the nonpartisan Congressional Research Service.

Although Obama signed the bill, the White House took issue with a provision opposing the movement to boycott Israeli products in protest of Israel’s occupation of the West Bank. Certain provisions of the bill lump together Israel and Israel-controlled territories, “contrary to longstanding bipartisan United States policy,” Obama said in a signing statement. Obama added that his administration will implement the bill in a “manner that does not interfere with my constitutional authority to conduct diplomacy.”