John Anderson/Wellsville Daily Reporter

It always seemed like a scam.

For the last two years, Facebook’s founder, Mark Zuckerberg, had been locked in a bizarre battle with a suspected huckster, Paul Ceglia, who claimed that he owned as much as 84 percent of the social networking site. Mr. Ceglia produced a series of contracts and e-mails as proof of the deal he said he struck in 2003 with Mr. Zuckerberg, who was then still a student at Harvard.

Facebook called the evidence “phony” and “fraudulent.” Yet the media couldn’t get enough of the case, often taking it very seriously, in part, because Mr. Ceglia had what appeared to be an all-star cast of lawyers by his side, vouching for the credibility of the case.

There was DLA Piper, the largest law firm in the nation, whose former chairman was Senator George Mitchell. Dennis Vacco, the former New York State attorney general, also took Mr. Ceglia as a client. Mr. Ceglia had also signed up, albeit only briefly because the firm quickly dropped him, Kasowitz Benson Torres & Friedman, which has counted as clients the Federal Housing Finance Agency and the private equity firm Apollo Management.

Terry Connors, a respected former federal prosecutor, took on Mr. Ceglia and then dumped him as well.

Last Friday, Mr. Ceglia was charged with fraud, accused of forging the documents at the heart of the case. The United States attorney in Manhattan, Preet Bharara, stated: “By marching into federal court for a quick payday based on a blatant forgery, Paul Ceglia has bought himself another day in federal court for attempting a multibillion-dollar fraud against Facebook and its C.E.O.”

But guess who has come away seemingly unscathed?

The lawyers who represented Mr. Ceglia and — with dollar signs in their eyes — seemingly aided his cause.

Some of the law firms that worked for Mr. Ceglia not only took on the case, they argued volubly that they had vetted Mr. Ceglia’s evidence.

“I would not have gotten involved and DLA would not have gotten involved if we had any doubts about the facts or evidence in the case,” Robert Brownlie, a partner at DLA Piper, told The American Lawyer last year.

Mr. Brownlie ultimately withdrew from the case, but only after Kasowitz Benson dropped Mr. Ceglia first and wrote Mr. Brownlie a letter saying that it was “withdrawing from the case based on a determination that the purported contract at issue is a fraud,” according to a court filing. Still, it took Mr. Brownlie two more months before he chose to sever ties with Mr. Ceglia. What took him so long after it became clear his own client was suspected of engaging in fraud? The once-chatty Mr. Brownlie is not returning calls from reporters.

Mr. Vacco declined to comment, citing attorney-client privilege as the reason he could not explain why he no longer represented Mr. Ceglia.

Lawyers who initially agreed to take Mr. Ceglia’s case clearly hoped that they would make tens of millions if not billions of dollars as a result of a settlement, similar to the one that Mr. Zuckerberg reached with the Winklevoss twins and Eduardo Saverin, an early investor and friend of Mr. Zuckerberg’s. The twins were paid at least $65 million; Mr. Saverin, reportedly more than $1 billion.

When Mr. Ceglia was first looking for a high-powered lawyer to represent him, he had a local lawyer, Paul Argentieri, based in Hornell, N.Y., draft the equivalent of a promotional memo meant to attract other lawyers to the case. Mr. Argentieri indicated that he would be prepared to agree to a contingency fee arrangement — which would probably give any lawyer representing Mr. Ceglia a big chunk of any verdict or settlement in his favor. The memo also explicitly highlighted Mr. Zuckerberg’s previous settlements with Mr. Saverin and the Winklevosses, even though “they had no written agreements” with Mr. Zuckerberg, according to the memo.

As for the documents in Mr. Ceglia’s case, any lawyer worth his salt would have been quickly skeptical. According to the fraud case against him, Mr. Ceglia replaced one page of a two-page contract with Mr. Zuckerberg with a fake. Mr. Ceglia had a contract with Mr. Zuckerberg to do work on a site called StreetFax, not Facebook. “The spacing, columns and margins of page one of the alleged contract are different from the spacing, columns and margins of page two of the alleged contract,” the complaint says. In addition, Mr. Ceglia is accused of forging a series of e-mails that sounded rather fantastical on their face.

His lawyers, however, turned a blind eye until they had no choice but to withdraw — but not before burning through millions of dollars and the integrity of the justice system.

“Now that Ceglia is being brought to justice for his crimes, Facebook intends to hold accountable all of those who assisted Ceglia in this outrageous fraud,” Orin Snyder, a lawyer for Facebook and Mr. Zuckerberg, said in a statement on Monday. “Facebook will send a strong message that it does not tolerate legal shakedowns and will take aggressive action against all those who file abusive lawsuits against the company.”

Now that the big law firms have dropped Mr. Ceglia, who is representing him?

Dean Boland, a Lakewood, Ohio, lawyer who was once ordered to pay $300,000 to two minors for using their pictures in making a digitally crafted image of child pornography.

Reached by telephone, Mr. Boland said, “If I thought this was a fraud, I would have bailed out two seconds later,” adding that he’d “be the first one marching to the court” to turn Mr. Ceglia in. He said he was convinced that Mr. Ceglia had a strong civil case, which is still continuing, against Mr. Zuckerberg and Facebook.

Mr. Boland went so far as to say that the criminal complaint against Mr. Ceglia “will help in the civil case,” arguing that the government’s complaint suggests that the second page of Mr. Ceglia’s two-page contract with Mr. Zuckerberg is authentic.

Asked why so many other law firms had withdrawn from the case, Mr. Boland said, “You’d have to ask them.”

Asked to comment on the child pornography case he was involved in, he said, “I’m not getting into that. It’s on appeal.”