WASHINGTON, DC - JANUARY 23: Obsucred by guests' mobile phone cameras, U.S. President Barack Obama delivers remarks before taking questions during a reception for about 250 mayors from across the country in the East Room of the White House January 23, 2014 in Washington, DC. The U.S. Conference of Mayors is holding its winter meeting in Washington this week. (Photo by Chip Somodevilla/Getty Images)

WASHINGTON (Reuters) - The U.S. House of Representatives approved legislation on Friday to give mobile-phone users the right to 'unlock' their devices and use them on competitors' wireless networks, something that is now technically illegal.

The legislation cleared the Senate last week. President Barack Obama said in a statement that he looked forward to signing the bill 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," Obama said.

The lawmaking follows a 2012 ruling by the Library of Congress, the minder of U.S. copyright law, that effectively made phone unlocking illegal, even after the consumer completed the contract with its wireless carrier.

U.S. wireless carriers often tether, or "lock," smartphones to their networks to encourage consumers to renew mobile contracts. Consumers, for their part, can often buy new devices at a heavily subsidized price in return for committing to long-term contracts with a single carrier.

In December, major wireless carriers - including Verizon Wireless, AT&T Inc, Sprint Corp and T-Mobile US Inc - struck a voluntary agreement with the Federal Communications Commission to make it easier for consumers to unlock their phones after contracts expire.

Under current law, someone who unlocks their phone without permission could face legal ramifications, including jail.

New legislation, welcomed by consumer advocates, reinstates the exemption given to mobile phones in the copyright law before the controversial 2012 ruling by the Library of Congress and calls on the officials there to reconsider the issue during its next round of reviews in 2015, potentially expanding the exemption to tablets and other devices.

"Today's action by the House moves us closer to alleviating any confusion stemming from the Copyright Office’s 2012 decision," Jot Carpenter, vice president of government affairs at the wireless association CTIA, said in a statement.