Wikipedia is set to launch legal action Tuesday against the National Security Agency (NSA) and the U.S. Department of Justice in a challenge to the government's mass surveillance program.

The lawsuit, filed by the Wikimedia Foundation alongside eight other organizations, alleges that the NSA's mass surveillance of Internet traffic in the United States violates the First Amendment’s protection of freedom of speech and association, and the Fourth Amendment, which safeguard’s against unreasonable search and seizure.

The NSA's so-called Upstream surveillance program captures online communications with "non-U.S. persons" in order to acquire foreign intelligence information.

"By tapping the backbone of the Internet, the NSA is straining the backbone of democracy," Lila Tretikov, executive director of the Wikimedia Foundation, wrote in a blog post on its website.

"Wikipedia is founded on the freedoms of expression, inquiry, and information. By violating our users' privacy, the NSA is threatening the intellectual freedom that is central to people's ability to create and understand knowledge."

The NSA's current practices exceed the authority granted by the Foreign Intelligence Surveillance Act that Congress amended in 2008, Wikimedia said.

"We are asking the court to order an end to the NSA's dragnet surveillance of Internet traffic," Wikipedia founder Jimmy Wales wrote in an opinion piece in The New York Times.

Wikimedia and eight other organizations filing the lawsuit, including rights groups Human Rights Watch and Amnesty International USA, will be represented by the American Civil Liberties Union. The organizations are requesting that the court order the NSA to put a stop to its upstream surveillance and purge all records the NSA has obtained of their communications, according to the complaint.

Major U.S. technology companies suffering from the fallout of the NSA's mass surveillance programs are uniting to shore up their defenses against government intrusion.

The NSA and DOJ were not immediately available for comment.

Al Jazeera and Reuters