Anonymous says it is in the process of staging its “largest attack ever” — more than 5,000 loosely associated hackers taking down websites belonging to government and recording industry organizations in response to Thursday’s shutdown of the file-sharing site Megaupload.com.

The Department of Justice unsealed an indictment against Megaupload.com on Thursday, arresting its founder — Kim Dotcom, formerly known as Kim Schmitz — in New Zealand and charging him and at least five other company executives with violating privacy laws.

In response, the hacker collective known as Anonymous announced a collaborative attack against government and recording industry websites, successfully taking down the site of the Department of Justice — which coordinated the case against Megaupload — and the Recording Industry Association of America. As of 4 p.m. Pacific time, Justice.gov and RIAA.org were failing to load, along with other stated targets such as UniversalMusic.com.

Anonymous said on a Twitter account it has used regularly — @YourAnonNews — that the assault is “The Largest Attack Ever by Anonymous — 5,635 People Confirmed Using #LOIC to Bring Down Sites!” In other messages, the group said it was aiming to take down more sites throughout the night.

Members of Anonymous posted a statement to file-hosting site Pastebin.com late Thursday afternoon, according to the Twitter feed. The statement makes reference to the Megaupload arrests and indictment, and reiterates the members’ earlier statement that they were “launching our largest attack ever on government and music industry sites.” The statement provides a list of the sites targeted by the effort: justice.gov, universalmusic.com, riaa.org, mpaa.org, copyright.gov, hadopi.fr, wmg.com, usdoj.gov, bmi.com and fbi.gov.

Many of the sites named in the statement were still managing to load at times late Thursday afternoon, though in a slow fashion and with mixed results as to the content, including the home pages of the FBI, the Motion Picture Association of America and music publishing company BMI.

In a statement, the Department of Justice acknowledged that its website faced service problems and said it was approaching the issue as if it was the result of an intentional disruption.

“The Department of Justice web server hosting justice.gov is currently experiencing a significant increase in activity, resulting in a degradation in service,” the agency said in a statement. “The Department is working to ensure the website is available while we investigate the origins of this activity, which is being treated as a malicious act until we can fully identify the root cause of the disruption.”

The MPAA posted a statement Thursday confirming that the group’s site had been hacked, along with the Department of Justice’s website.

“Our website and many others, including the Department of Justice, were attacked today and the hacker group Anonymous is taking responsibility for the attacks,” the statement read.

“The motion picture and television industry has always been a strong supporter of free speech,” the statement added. “We strongly condemn any attempts to silence any groups or individuals.”

Megaupload is considered a “cyberlocker,” in which users can upload and transfer files that are too large to send by email. Such sites can have perfectly legitimate uses. But the Motion Picture Association of America, which has campaigned for a crackdown on piracy, estimated that the vast majority of content being shared on Megaupload was in violation of copyright laws.

The site allowed users to download TV shows, films, music, games and other content for free, but made money by charging subscriptions to people wanting faster download speeds or extra content.

Megaupload is based in Hong Kong, but some of the alleged pirated content was hosted on leased servers in Ashburn, Va., which gave federal authorities jurisdiction, the indictment said.

Before Megaupload was taken down, it posted a statement saying allegations that it facilitated massive breaches of copyright laws were “grotesquely overblown.”

“The fact is that the vast majority of Mega’s Internet traffic is legitimate, and we are here to stay. If the content industry would like to take advantage of our popularity, we are happy to enter into a dialogue. We have some good ideas. Please get in touch,” the statement said.

The Megaupload.com arrests occurred one day after websites including Wikipedia, Google (GOOG) and Craigslist participated in a large-scale online protest against two congressional proposals intended to thwart online piracy.

The Anonymous statement included addresses and contact information for Chris Dodd, a former Democratic U.S. senator from Connecticut who now heads the MPAA, one of the biggest backers of the two bills Congress is considering: The Stop Online Piracy act, also known as SOPA, and the Protect IP Act, known as PIPA. Addresses of MPAA offices are also included.

The Associated Press contributed to this report. Contact Jeremy C. Owens at 408-920-5876; follow him at Twitter.com/mercbizbreak.