The rapidly approved law will give consumers more freedom to switch carriers

The right to unlock your cellphone became law on Friday as President Barack Obama signed a bill that rapidly passed both houses of the U.S. Congress.

The Unlocking Consumer Choice and Wireless Competition Act passed in the Senate on July 16 and was unanimously approved by the House of Representatives last Friday. Obama had been expected to sign it.

The law restores U.S. consumers’ rights to update the software on their phones so they can change mobile operators. That practice had been outlawed by a January 2013 decision by the Library of Congress, which ruled that consumer unlocking violated the Digital Millennium Copyright Act (DMCA).

Most cellphones sold in the U.S. come with built-in software that locks the phone so it can be used on only one carrier’s network. The Library of Congress had found that changing that software violated the anti-circumvention provisions of the DMCA, which are typically deployed against cracking of digital-rights-management technology.

The law just signed is good news for customers of AT&T and T-Mobile, which use the same network technology, so phones can be switched easily if unlocked. It also benefits international travelers who want to buy service from a foreign carrier instead of roaming, which is typically more expensive.

However, there is a catch to the new law: Its exemption to the DMCA will expire in 2015, when the Library of Congress is due to make another rulemaking on the subject.

“Unfortunately, Congress wasn’t ready to deal with the underlying copyright issue that makes it illegal to unlock your phone,” said Sina Khanifar, who organized an online petition against the Library of Congress decision, in a prepared statement. “I’m going to be celebrating tonight. And consumers have another year and half to unlock their devices. Hopefully the Librarian of Congress will have better sense than to deny an unlocking exemption again.”