People try the new Windows Phone 7 mobile operating system on October 11, 2010 in New York, New York. The phone, which will be available in the United States on AT&T's network, looks to compete with the iPhone, Android and BlackBerry smartphones.National Journal

The House unanimously passed legislation Friday to legalize cell-phone unlocking, which would make it easier for consumers to switch providers without buying a new phone.

President Obama issued a statement saying he will sign the legislation into law.

"The bill Congress passed today is another step toward giving ordinary Americans more flexibility and choice, so that they can find a cell phone carrier that meets their needs and their budget," he said.

The House already approved a similar bill in February, but that version included controversial language to keep people from unlocking phones in large batches. Consumer groups and many Democrats rallied against the provision, saying it undermined the bill.

The Senate approved a version of the bill earlier this month without the ban on bulk unlocking. The House then agreed to pass the Senate's version of the bill. 

"This is something that Americans have been asking for and I am pleased that we were able to work together to ensure the swift passage of legislation restoring the exemption that allowed consumers to unlock their cell phones," House Judiciary Committee Chairman Bob Goodlatte said in a statement.

Most contract cell phones come "locked" to one network. Because of a decision by the U.S. Copyright Office in 2012, customers must obtain their carriers' permission to legally unlock their phones to switch to competitors — even after they have completed their contracts.

The decision prompted an immediate public backlash, and more than 114,000 people signed a White House petition in protest.

The Unlocking Consumer Choice and Wireless Competition Act would overturn the office's decision and would direct the office to consider whether to allow unlocking of other devices, such as tablets.

Consumer groups such as Public Knowledge and the Electronic Frontier Foundation support the bill, although they have also pushed for broader legislation that would amend the underlying copyright law.

The Copyright Office is set to update its rules on cell-phone unlocking anyway next year. 

CTIA, the lobbying group for cell-phone carriers, argues the issue is overblown but backed the bill, saying it would at least "relieve consumer confusion."

Under pressure from the Federal Communications Commission, all the major carriers already signed on to a commitment last year to allow their customers to unlock their phones. 

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.