Federal authorities shut down one of the Web’s most popular sites Thursday on charges that it illegally shared movies, television shows and e-books, prompting hackers to retaliate by blocking access to several Web sites, including those of the Justice Department and Universal Music.

The shutdown of Megaupload was part of a federal indictment accusing the company of running an international criminal organization that allowed consumers to easily watch or share pirated content. The site’s offerings were a virtual bazaar of what the Internet has to offer, including pornography and illegally copied video games, federal officials said. In some cases, people could see movies before they were released in theaters.

Investigators say Megaupload’s executives made more than $175 million through subscription fees and online ads while robbing authors, movie producers, musicians and other copyright holders of more than $500 million.

“This action is among the largest criminal copyright cases ever brought by the United States,” the Justice Department and FBI said in a statement.

Seven executives, including Megaupload’s founder, were indicted. But Swizz Beatz, who is listed on some sites as the company’s chief executive, was not charged. Beatz, a musician, is married to singer Alicia Keys. Although the music and movie industries are among those most harmed by piracy, numerous celebrities have endorsed the Megaupload site, including Kanye West, Kim Kardashian, and rappers P. Diddy and Will.i.am.

Megaupload was estimated at one point to be the 13th most frequently visited site on the Internet, according to the indictment. The site claims to have about 50 million daily visits.

Justice Department officials said Thursday that the timing of its indictment had nothing to do with a debate this week on Capitol Hill over legislation that takes aim at online piracy.

Nevertheless, the federal action angered hackers, escalating a growing battle between Washington and the Web’s power brokers, both legitimate and illicit.

Internet companies say the proposed legislation would give too much power to law enforcement to shut down Web sites, and some cited the Justice Department’s actions on Thursday as evidence.

This week, Wikipedia, Google and other major Web sites displayed their influence when they blacked out their sites or encouraged users to protest the bills. Their efforts, which persuaded some lawmakers to drop their support of the measures, overcame a traditional lobbying effort by Hollywood and other media companies.

On Thursday, hours after federal officials unsealed their indictment, a loosely affiliated group of hackers known as Anonymous said it had shut down the Justice Department’s site and was taking aim at lawmakers and agencies in Washington as well as media companies that had supported the ­anti-piracy legislation.

Through Twitter and other affiliations, Anonymous vowed to go after the Web sites of the White House, FBI, the U.S. Copyright Office and the Motion Picture Association of America, among others.

The federal indictment alleges that Megaupload was controlled by a global organization, dubbed by investigators as the “Mega Conspiracy.” Officially, the company was called Megaupload Ltd. and was founded by “Kim Dotcom,” 37, who has several aliases and was a resident of both Hong Kong and New Zealand, where he was arrested.

Six other executives, who are residents of Germany, Slovakia, Hong Kong, Estonia, Turkey, the Netherlands and New Zealand, were also charged. Three of the indicted individuals remain at large.

The indictment, which caps a two-year investigation, was handed up by a grand jury in the Eastern District of Virginia. Charges included criminal copyright infringement, racketeering and money laundering.

Law enforcement officials executed more than 20 search warrants in the United States and eight other countries and seized about $50 million in assets. They targeted sites where Megaupload has servers, including two local companies — Carpathia Hosting in Ashburn and Cogent Communications in the District — as well as others in the Netherlands and Canada, the officials said. The U.S. District Court in Alexandria also ordered the seizure of 18 domain names associated with the alleged conspiracy.

Ira Rothken, an attorney for Megaupload, denied the charges and said the company would “vigorously defend itself” in a criminal case, adding that “we believe we will succeed.”

He said that the Hong Kong-based company was surprised by the indictment and that it had never been contacted by the FBI to defend itself.

“There was a complete lack of notice and opportunity to be heard by Megaupload, and therefore that raises serious due process concerns that the government could shut down an entire series of Web sites without a court hearing either side,” Rothken said.

Sen. Patrick J. Leahy (D-Vt.), the lead author of the anti-piracy bill called the Protect IP Act (PIPA), praised the Justice Department’s actions.

“Today’s action by the Department of Justice against the leaders of Megaupload.com shows what law enforcement can do to protect American intellectual property that is stolen through domestic Web sites,” Leahy said.

But opponents of the anti-
piracy bills — PIPA in the Senate and the Stop Online Piracy Act (SOPA) in the House — were alarmed about the agency’s actions.

Markham Erickson, head of NetCoalition, a group that represents Google, Facebook and eBay in lobbying against the legislation, said the FBI’s seizure of sites may not be giving online companies due process. He said he fears the bills could make it even easier for law enforcement to get permission from the courts to shut down sites.

Casey Rae-Hunter of the Future of Music Coalition, a group that represents artists and has fought against the bills, said the indictment raises the question of whether legislation was needed “if law enforcement can go ahead and seize this site.”

Barrett Brown, the Dallas-based founder of an online think tank that works with Anonymous, confirmed in a telephone interview that the hacker group was aiming to take down Web sites by bombarding them with an overwhelming amount of traffic.

Brown, who said he is a former journalist working on a book about Anonymous, said the hackers are devising a new attack against Democratic members of Congress who are still endorsing the legislation.

“We’re trying to decide if we’re going to target one Congress member first or warn them first,” he said. “Another method would be to go after their donors, too.”

Brown added that Anonymous hackers might also figure out a way to ensure that the names of certain lawmakers would be linked to their support of SOPA.

Brown said, “We have means to tie someone’s name to something forever using search engine optimization.”

Staff writers Ed O’Keefe, Ellen Nakashima, Ian Shapira, Julie Tate and Hayley Tsukayama contributed to this report.