When the list of prominent internet companies participating in a semi-secret government surveillance program called PRISM leaked, most of the world’s massive tech firms were not on it. But one company received particular attention for its absence: Twitter, which was approached by the National Security Agency but never joined the program. "Twitter deserves kudos for refusing to give in," wrote Techdirt.

Unlike Google or Facebook, which were both on the list, Twitter doesn’t have a lot of private data on its 200 million users. In fact, Twitter is much younger and smaller than the nine giants participating in PRISM; if it had been included, it would have stuck out. It’s much more surprising that larger companies such as Amazon and BlackBerry weren't included in the program.

However, Twitter’s refusal to join PRISM highlighted the fact that the company has a history of being uncooperative, and often antagonistic, when the government asks for user data.

Twitter has a history of being uncooperative, and often antagonistic, with the government

Current and previous employees of Twitter point to the company’s top lawyer, Alex Macgillivray, a smart, serious, and strong-willed advocate who believes Twitter is a platform for free expression and must remain as neutral as a pen. Macgillivray, who everyone simply calls "Amac" (pronounced "eh-mack") after his Twitter handle, "doesn’t give a shit" when the government comes knocking with demands and intimidation, sources told The Verge.

In practice, that still means Twitter complies with a majority — 69 percent — of government requests for information. That’s much lower than Google, which complies with 88 percent of orders. Both companies have a policy of notifying users whenever their information is requested, but Twitter makes the government fight for every inch, often going to court even when victory is uncertain. When a judge attached a gag order to a request for user accounts connected to WikiLeaks, Twitter fought the order in a secret court and won. More recently, Twitter tussled with the New York City Police Department over a request for information on an Occupy Wall Street protester, and lost.

Twitter has earned a reputation for not just resisting government intrusion, but actively pushing back against it. However, the company may be collecting more plaudits than it deserves for abstaining from the government’s PRISM program — and it’s uncertain how long the young company can keep up its defiant front.

How long can Twitter keep up its defiant front?

The details of PRISM are still emerging, but leaked documents and press reports suggest it is a computerized system that makes it easier for the government to retrieve real-time data on users who are outside the US. There are many reasons why Twitter may have been able to excuse itself while others felt compelled to comply.

First, Twitter would have been a lower priority for the government than Google, Facebook, Yahoo, Skype, and the rest of the participating companies (even the relatively underground service Dropbox, which was reported to be in the process of joining, would have more potentially sensitive information to share). Twitter doesn’t have much data on its users: most posts are public, and the company doesn’t collect addresses, credit card information, or identifying information beyond IP addresses. Twitter received 1,858 government requests for user data in 2012; Google got 21,389.

It’s also possible that Twitter did not have the ability to build the system the government wanted. Twitter is famous for its growing pains; just a few years ago, the company’s iconic "fail whale" was a persistent reminder of its technical troubles. Even today, it has difficulty displaying old tweets and direct messages. Twitter could have argued that a PRISM interface would be too onerous a burden for a company that is still patching up its foundation. This excuse won’t be valid much longer, however, as Twitter shores up its internal structure.

Twitter may be incapable of building what the NSA wanted

Until recently Twitter was also focused on data minimization — collecting and storing only the barest of information — in part because of its shaky architecture. But pressure from advertisers may reverse this trend. Advertisers need more data points in order to target their ads and verify that they’re reaching users. For example, Twitter does not collect location information unless users check a box to display it on their tweets. But as monetization becomes more important, the company may be tempted to store all location information for advertisers. And the more data Twitter stores, the more attractive it is to government officials. "There is this cheesy line from the movie Field of Dreams: ‘If you build it, they will come,’" Chris Soghoian, senior policy analyst for the American Civil Liberties Union, told The Verge. "And if you store your customer data, the government’s going to come and ask for it later."

Twitter founders Evan Williams and Jason Goldman knew Macgillivray at Google, and they hired him because he shared their ideals (Goldman once went toe-to-toe with Sheryl Sandberg over censorship on the Blogger platform). However, most of the founding Twitter team has moved on, leaving Macgillivray to set the agenda on user rights.

To date, Macgillivray’s pro-user, damn-the-man attitude has permeated Twitter. He honed his philosophy at Harvard’s Berkman Center for Internet and Society and then at Google, where he was instrumental in introducing the company’s transparency reports and fought the Justice Department when it requested information on user search queries. He brought over a number of colleagues from Google, including head of litigation and intellectual property Benjamin Lee, who shared his views.

Macgillivray isn’t a total anarchist; he’s business-minded, as long as profit goals don’t conflict with user interests. Yet he has been known to clash with Twitter CEO Dick Costolo, who recently bragged at the AllThingsD conference that Twitter’s mobile team is moving too fast to "[go] through legal." Macgillivray has retained his influence over Twitter's policies so far, but the company's priorities are changing as it grows.

Twitter earned the highest rating on the Electronic Frontier Foundation’s privacy scorecard. But the EFF declined to comment for this story, saying that it was hesitant to endorse Twitter despite the company’s good record because of its uncertainty about the future. After the recent revelation of two major government surveillance programs, Twitter joined Google, Facebook, and Microsoft in calling on the government for increased transparency around user data requests. But the company’s continued growth, coupled with pressure to make money in advance of an IPO, will be the true test of Twitter’s commitment to user privacy.