Dealing a blow to two bills pending in the House and the Senate, the White House on Saturday announced that it could not support anti-piracy legislation that “reduces freedom of expression, increases cybersecurity risk, or undermines the dynamic, innovative global Internet.”

The Obama administration still favors passage of some kind of legislation, but their concerns come as opponents have flooded lawmakers with e-mails and letters. The legislation — backed by Hollywood studios, guilds and record labels — once looked like it would easily pass with hefty bipartisan support until it ran into a rally of opposition from Internet firms and online activists late last year.

The White House has every interest in coming up with a compromise pleasing to the entertainment industry and the tech sector. President Obama drew heavily on support from Hollywood and Silicon Valley in 2008, and will do so again this cycle. But politically, the legislation poses a potential problem for him if it reaches his desk yet remains polarizing, particularly to the tech community and the so-called “netroots” that proved so potent in his last campaign.

“While we believe that online piracy by foreign websites is a serious problem that requires a serious legislative response, we will not support legislation that reduces freedom of expression, increases cybersecurity risk, or undermines the dynamic, innovative global Internet,” the administration said in a blog post signed by three officials: Victoria Espinel, intellectual property enforcement coordinator;  Aneesh Chopra, U.S. chief technology officer; and Howard Schmidt, special assistant to the president and cybersecurity coordinator for the national security staff.

The bills are aimed at curbing piracy via foreign rogue websites, via a series of measures. The Stop Online Piracy Act is pending before the House Judiciary Committee, and the sister bill, the PROTECT IP Act, is scheduled for a cloture vote on Jan. 24 to start debate on the Senate floor.

The three White House officials did not say specifically whether Obama would veto the current versions of the legislation.

But they cited provisions in which domain names of sites trafficking in infringing content could, by court order, be blocked. They said that such measures “pose a real risk to cybersecurity and yet leave contraband goods and services accessible online.”

House Judiciary Chairman Lamar Smith (R-Texas), who introduced SOPA, announced on Friday that he would remove the provision. In a statement on Saturday, he said that he now believes that the legislation “meets White House requirements.” Although the provision remains in the Senate version of the bill, Senate Judiciary Chairman Patrick Leahy (D-Vt.) said that he would recommend that it be studied further before implementation.

Markham Erickson, the executive director of the NetCoalition, a group Internet companies including Google, Facebook and Twitter that have been opposed to the legislation, said that the administration’s statement was “welcome news.”  He added that House Majority Leader Eric Cantor has said that the legislation would not go to the floor of the House “without consensus.”

The administration’s statement was in response to a petition submitted by opponents to its “We the People” site, in which signature gatherers can expect a statement from the White House on any issue if at least 25,000 have given their signatures. The White House said that they plan to host an online event to get more input, and that petition organizers and a random sample of its signers willbe invited to a conference call.

The White House made clear that some action needed to be taken, noting that “existing tools are not strong enough to root out the worst online pirates beyond our borders.”

They added that the administration “calls on all sides to work together to pass sound legislation this year that provides prosecutors and rights holders new legal tools to combat online piracy originating beyond U.S. borders while staying true to the principles” outlined in the statement.

Update: This is a big setback to the entertainment industry, as it is becoming clear that a final bill will have far less teeth than the original version of the legislation. The MPAA and the RIAA each released statements today calling for action, but also expressed some wariness that the final bill will not do much to solve the problem.