The bill reverses a 2013 decision that phone unlocking by consumers ran afoul of copyright laws

A bill that allows consumers to unlock their cellphones for use on other carriers passed its last hurdle in Congress on Friday, opening the way for it to become law once it is signed by President Barack Obama.

Senate Bill 517 overturns a January 2013 decision by the Library of Congress that ruled the unlocking of phones by consumers fell afoul of the Digital Millennium Copyright Act (DMCA). It had previously been permitted under an exception to the anti-circumvention provisions of the DMCA, which are generally aimed at cracking of digital rights management technology.

Cellphones and smartphones are typically supplied to consumers with a software lock that restricts their use to a single wireless carrier. Removing that lock -- the process of "unlocking" the phone -- means it can be used on the networks of competing carriers. In the U.S., this is most often done with handsets that work on the AT&T or T-Mobile networks, which share a common technology, but is also popular with consumers who want to take their phones overseas and use foreign networks rather than roaming services.

The Unlocking Consumer Choice and Wireless Competition Act has made fast progress through Congress. It was passed by the Senate on July 16, just a week after it was passed by the Senate Judiciary Committee, and on Friday by unanimous vote in the House of Representatives. It now waits to be signed into law.

In addition to making the unlocking process legal under copyright law, the bill also directs the librarian of Congress to determine whether other portable devices with wireless capability, such as tablets, should be eligible for unlocking.

"It took 19 months of activism and advocacy, but we're finally very close to consumers regaining the right to unlock the phones they've legally bought," said Sina Khanifar, who organized an online petition that kicked off the push to have the Library of Congress decision overturned. The petition attracted more than 114,000 signatures on the White House's "We The People" site.

"I'm looking forward to seeing this bill finally become law -- it's been a long road against powerful, entrenched interests -- but it's great to see citizen advocacy work," he said in a statement.