Editor’s note: Derek Khanna is a technology policy consultant and columnist. He previously worked for the House Republican Study Committee where he authored their report on copyright reform. He spearheaded the national campaign on cellphone unlocking that resulted in proposed legislation to legalize unlocking your phone. Derek regularly writes for The Atlantic, National Review and Forbes.

The Internet has helped bring down regimes, elect politicians, and stop lawmaking in its tracks, but until 2014 it has never directly led to legislation. On Friday, in the midst of the least productive Congress in history, that changed when legislators passed the “Unlocking Consumer Choice and Wireless Competition Act” as the direct result of an online petition.

This is the opening salvo of a new generation of e-activism leading to policy changes, one that can bypass the special interests who normally control the political process in Washington.

Understanding the significance of this event requires a bit of history. In 2013 a ruling went into effect from a largely unknown government regulator: The Librarian of Congress.

The Librarian has been granted enormous authority as part of the Digital Millennium Copyright Act (DMCA) of 1998 to, essentially, determine which technologies violate US copyright law (through providing exemptions). Every three years technologists, consumer advocates and, of course, industry lobbyists petition the Librarian to rule on the legality of specific technologies.

In 2012 lobbyists for the Wireless Association, representing major wireless companies, petitioned the Librarian of Congress to change a rule that allowed consumers to unlock their phones. Unlocking means taking a phone from one provider to another, and unlocking is a key method of competition in the wireless industry.

Most consumers are likely unaware that there are over 100 wireless carriers in the United States, and unlocking helps them compete with the big players. The Department of Commerce, consumers groups, and another trade association representing smaller wireless carriers explained how important it was for consumers to be able to unlock their phones, but ultimately the Librarian sided with industry.

On January 24, 2013, unlocking your phone became a crime, potentially punishable by five years in prison and a $500,000 fine.

Within days, the online marketplace for unlocking dried up, making it practically impossible for the average consumer to unlock their device. Soon the resale market for phones was completely distorted, with the market value for resale plummeting. At the time, I even received e-mails from a number of service members deployed to Afghanistan asking, “Are you telling me it’s a crime for me to unlock my phone here? But they don’t have __ service in Kabul!”

I had been working on and proposing copyright reform as a congressional staffer for the House Republican Study Committee, specifically highlighting how copyright law was now affecting technology that has nothing to do with protecting content holders. This ruling went into effect less than a month after our report argued that legitimate technologies were being impeded by a misuse of copyright law.

Once I left Congress in 2013, my goal was to finish what I started by reforming copyright law from the outside. I started giving speeches and writing on this phone unlocking issue in particular, because it was the quintessential example of the problems with modern copyright law. I researched some of the legal implications of this ruling and what could be done to fix it.

Meanwhile, Sina Khanifar, an entrepreneur whose company offered unlocking services to consumers and was shut down, started a White House “We the People” petition and, eventually, we teamed up.

The White House had just raised the required signatures for a response to 100,000, and no one had hit that number before – there was genuine worry that a complicated issue wouldn’t be able to attract sufficient attention in a month. But nonetheless, we went on a 30 day advocacy tour, speaking and writing, e-mailing reporters, and engaging as many groups as we could.

I began speaking with Members of Congress, their staff and outside groups. At first no one wanted to touch the issue, then they called us fools for daring to take on two of the top lobbying powers that had driven this policy change in Washington.

Finally, they began to fight us. Hill papers published blatant misrepresentations of our campaign written by industry groups and refused to publish our side. When the White House petition hit 100,000 signatures, we were unclear what the next step would be. We expected the White House to be potentially just as reluctant to confront cronyism; the Librarian of Congress is an appointed official of the President.

Instead, the White House came out strongly in favor of unlocking not just phones, but tablets, realizing how this ruling was killing competition and hurting the consumer. Then Congressman Jason Chaffetz (R-UT) tweeted that he was going to introduce legislation on the subject. That was the beginning of a sea change.

Working on leg to unlock your mobile phones. It is a freedom issue. You own the phone, you should be able to unlock it. .@DerekKhanna — Jason Chaffetz (@jasoninthehouse) March 5, 2013

Once legislation was introduced, continuing the momentum and crafting the legislation was even harder with big business lobbyists fighting us every step of the way.

This will be a systemic problem for future e-activism campaigns leading to legislation: once you get a bill introduced with momentum you need to be able to channel that momentum through the process and know how to work the system. We were helped in this effort by support from several outside organizations such as Generation Opportunity, Freedomworks and R Street, which advocated and mobilized supporters. And we benefited greatly from help by Public Knowledge directly speaking to members of Congress.

Multiple bills were introduced in the House, including the legislation that moved, which originated in the office of Chairman Bob Goodlatte (R-VA). I provided written testimony in the committee, and we ultimately supported the legislation that passed committee (while we had reservations). Months after the bill passed committee, a different bill was put on the floor that included language inserted by special interest groups that caused all major organizations to pull their support. (It was so unusual that several Members of Congress are now demanding that the House Parliamentarian investigate the matter of how the bill changed at the 11th hour.)

Nonetheless this version of the bill, with what many considered to be a “poison pill,” passed the House.

There was still a chance to restore the original meaning of the bill in the Senate, thanks to Senate Judiciary Chairman Patrick Leahy (D-VT).

When Senator Leahy fixed the bill, essentially restoring the original bill that we supported before special interests got to work, the Senate passed the bill by unanimous consent and the House quickly passed the bill as well. It was one of around 160 bills that passed Congress this session, most of which are mandatory or “naming” bills.

That such a bill could pass unanimously raises the question, why does Congress continue to delegate authority to the Librarian of Congress to make such egregious rulings?

Just as importantly as legislation, this campaign also led to something perhaps more impactful: The FCC investigated the issue of phone unlocking and got a consent decree with every carrier to allow consumers to unlock their devices. This means that carriers must allow every consumer to unlock their devices, and if carriers don’t follow through on their word (as they have been caught failing to do before), then consumers can unlock their devices anyway without facing legal liability. This is good for the consumer and competition.

Unlocking your phone is now legal, but the Librarian of Congress will rule again in 2015 on whether it should stay legal. Technologies that do not have an infringing purpose should be inherently legal, and there is bipartisan legislation (H.R. 1892, the Unlocking Technology Act of 2013) sitting in Congress that would fix this problem permanently introduced by Reps. Zoe Lofgren (D-CA), Thomas Massie (R-KY), Anna Eshoo (D-CA) and Jared Polis (D-CO).

E-activism leading to legislation is not an aberration; rather, it is the logical progression of the SOPA/PIPA movement. Most political/social movements throughout history start with skirmishes and work their way to larger battles. Phone unlocking was a small battle, but it’s the beginning of a larger trend on how the digital generation will affect policy.