Two lawyers were charged Friday with a "massive extortion scheme" in which they uploaded X-rated films to file-sharing sites, sued the people who downloaded them — and collected millions from victims who feared public humiliation, prosecutors said.

Paul Hansmeier and John Steele actually produced some of the pornography, solely for the purpose of copyrighting it so they could file "sham lawsuits" used to shake down their targets, Minnesota U.S. Attorney Andrew Luger said.

"The conduct of these defendants was nothing short of outrageous," Luger said at a press conference hours after Hansmeier and Steele were charged with conspiracy to commit fraud, money laundering and perjury.

"Everything about their practice of law was fraudulent."

Authorities arrested Paul Hansmeier, of Woodbury, shortly before U.S. Attorney Andrew Luger announced charges on Dec. 16. Carlos Gonzalez / ZUMAPRESS.com

Luger sounded disgusted as he described the alleged scheme in which two officers of the court allegedly used unwitting judges to unmask those who downloaded the porn — until it became clear in 2013 that the lawsuits were not legitimate.

The lawyers began by offering to represent the makers of sex films against video pirating, prosecutors said. But instead of trying to protect the copyrighted material, they allegedly put them on websites where they knew they would be illegally downloaded.

Because all they had was internet addresses for the downloaders, the attorneys filed copyright infringement lawsuits against "John Does" and then sought subpoenas that gave them names.

They never intended to go forward with the lawsuits because the litigation would reveal that they had uploaded the movies themselves, Luger said. Instead, they offered the victims the chance to settle and keep their name out of court papers for several thousand dollars, according to the indictment.

Eventually, Hansmeier and Steele realized they could cut out the middlemen. They went to a porn convention and cut deals to produce porn they could use to trap more file-sharers. "They were essentially their own clients," Luger said.

In an offshoot of the original scheme, the defendants created a company called Guava, then claimed that its computer systems had been hacked in an effort to find the names behind some Internet addresses and file more lawsuits, the indictment charges.

Until courts got wise to what was happening, the pair raked in about $6 million in settlements, prosecutors said.

Hansmeier and Steele's firm, Prenda Law, fell apart after courts hit it with sanctions and a federal judge referred them to criminal investigators.

Hansmeier, 35, who was suspended from practicing law this fall, was arrested Friday morning and was due to appear in court later in the day. His wife, attorney Padraigin Browne, said she had no comment. Steele, 45, was arrested in Florida; his Chicago law office said they did not know who is representing him.

In previous litigation they had denied any fraud.