Declan McCullagh/CNET

The Wikimedia Foundation, the organization that operates the wildly popular online encyclopedia Wikipedia, says user privacy has been violated and that it's going to court to try to fix it.

Wikimedia filed a lawsuit on Tuesday in the US District Court for the District of Maryland against the National Security Agency and the US Department of Justice for allegedly violating its constitutional rights on Wikipedia. The organization argues that an NSA program collecting information wholesale across the Internet, known as upstream surveillance, is a violation of its First Amendment right of free speech and a violation of the Fourth Amendment's ban on unreasonable search and seizure.

Wikimedia said it is joined by eight other organizations, including Human Rights Watch and Amnesty International, and represented by The American Civil Liberties Union. Wikimedia has been working on the lawsuit for "approximately one year," said its general counsel, Geoff Brigham.

"Privacy is the bedrock of individual freedom. It is a universal right that sustains the freedoms of expression and association," Wikimedia wrote Tuesday on its blog. "These principles enable inquiry, dialogue, and creation and are central to Wikimedia's vision of empowering everyone to share in the sum of all human knowledge. ... If people look over their shoulders before searching, pause before contributing to controversial articles, or refrain from sharing verifiable but unpopular information, Wikimedia and the world are poorer for it."

Wikipedia is the world's most comprehensive online encyclopedia. The service comprises editable wikis that allow users to correct misinformation and add details on individuals, events, organizations and ideas. More than 500 million people worldwide visit Wikipedia each month, and at least 75,000 people around the globe add or edit the content.

In 2013, one-time NSA contractor Edward Snowden leaked information revealing Wikipedia was a target of government surveillance. According to Snowden, the US government taps the Internet's "backbone" (the core data routes between large, interconnected network centers) to capture communication with "non-U.S. persons." Part of that surveillance is authorized by the Foreign Intelligence Surveillance Act (FISA) that Congress amended in 2008, which supports US spy agencies to collect Internet information at will. (A large component in the NSA's mission stems from a 1981 executive order that legalized surveillance of foreigners living outside the US.)

Since Snowden's leaks began, the US government has shied away from claims that it may be intercepting communications and information from Americans. FISA does not authorize spying on US citizens. The ACLU and Wikimedia believe surveillance agencies are violating that regulation.

"In the course of its surveillance, the NSA copies and combs through vast amounts of Internet traffic, which it intercepts inside the United States with the help of major telecommunications companies," the ACLU said in a statement on Tuesday. "It searches that traffic for keywords called 'selectors' that are associated with its targets. The surveillance involves the NSA's warrantless review of the emails and Internet activities of millions of ordinary Americans."

Jimmy Wales / The People's Operator

In an editorial in The New York Times on Tuesday, Wikipedia co-founder Jimmy Wales argued that the US government's sweeping collection of information across the Web has put Wikipedia in its crosshairs and has discouraged the service's users, many of whom seek to operate anonymously.

"On our servers, run by the nonprofit Wikimedia Foundation, those volunteers discuss their work on everything from Tiananmen Square to gay rights in Uganda," Wales wrote. "Many of them prefer to work anonymously, especially those who work on controversial issues or who live in countries with repressive governments."

FISA-related data collection has long been a murky business. When technology companies provide their transparency reports on requests for user information, they can often reveal the exact number of warrants or law enforcement demands they've received, but only provide a broad range of FISA requests. Google, for example, revealed last year that it received between zero and 999 FISA requests in the six months that ended December 2013.

In response to those ranges, Twitter last year sued the US government to lift a gag order about NSA spying. The move came after Google requested the same of the US Justice Department.

"It's our belief that we are entitled under the First Amendment to respond to our users' concerns and to the statements of US government officials by providing information about the scope of US government surveillance -- including what types of legal process have not been received," Twitter legal counsel Ben Lee said last year. "We should be free to do this in a meaningful way, rather than in broad, inexact ranges."

Now Wikimedia and Wales have taken their argument a bit further. Wikimedia says that the wholesale collection of information under the FISAAmendments Act of 2008 is based in shaky justification, at best, and often entangles innocent individuals.

"The statute only requires 'reasonable belief' that a non-US person is located outside the United States," Wikimedia wrote in its blog Tuesday. "There is no need to show that target is a foreign agent, much less a terrorist. The purpose of the statute is to acquire 'foreign intelligence information'-- a very general concept. We believe the broad interpretation of this statute that allows for upstream surveillance is unconstitutional."

Ultimately, Wikimedia wants the US government to stop its upstream surveillance and has asked the court to rule that it is unconstitutional. "Surveillance might be used to reveal sensitive information, create a chilling effect to deter participation or, in extreme instances, identify individual users," Wikimedia's Brigham said.

The lawsuit also requests a permanent ban on upstream surveillance and wants the US government to destroy all communications it has collected as part of that surveillance.

The NSA did not respond to a request for comment.