Updated

Was it anti-gay bias? A computer glitch? A brilliant hack? Or an English-French translation error?

Whatever the reason, bloggers noticed Sunday that a lot of gay-themed books had suddenly lost their Sales Rank tags on Amazon.com, while titles dealing with straight sex had kept theirs.

"This is an embarrassing and ham-fisted cataloging error for a company that prides itself on offering complete selection," Amazon spokeswoman Patty Smith told FoxNews.com via e-mail.

Sales Rank is a line entry on each book's Amazon page stating where that title currently stands on the online retailer's best-seller list, which contains millions of books.

Authors are naturally concerned to see where their own books rank; publishers believe that high rankings spur more sales.

According to the Associated Press, books that lost their Sales Ranks included classics such as James Baldwin's "Giovanni's Room," Gore Vidal's "The City and the Pillar" and Jeanette Winterson's "Oranges Are Not the Only Fruit."

• Click here for FOXNews.com's Personal Technology Center.

• Got tech questions? Ask our experts at FoxNews.com's Tech Q&A.

Some people suspected a hidden agenda on Amazon's part. The company claimed Sunday it was a software error.

But on Monday, a well-known hacker and Internet "troll" claimed credit, saying it was a prank on his part.

And Mike Daisey, a former Amazon employee who's written about his time working there, said it was the result of an administrator on the French version of Amazon confusing the English words for "adult" and "erotic."

Smith's e-mail seemed to indicate something along the lines of Daisey's theory.

"It has been misreported that the issue was limited to Gay & Lesbian themed titles — in fact, it impacted 57,310 books in a number of broad categories such as Health, Mind & Body, Reproductive & Sexual Medicine, and Erotica," she wrote.

The ball got rolling early Sunday morning when Mark R. Probst, an author and publisher of gay-themed Young Adult titles, put up a blog posting detailing how "hundreds" of gay-interest titles had suddenly lost their Sales Ranks.

More blog postings went up in response, and by the end of the day Twitter feeds about "#amazonfail" were exploding.

"Thanks, Jeff Bezos, for proving homophobia & literary ignorance is alive & well at Amazon.com," tweeted New Yorker writer Susan Orlean, author of "The Orchid Thief."

Craig Seymour, author of the gay memoir "All I Could Bare," wrote on his blog Sunday that his book's sales rank had been dropped in February, then restored nearly four weeks later, after he was told by Amazon that his book had been "classified as an Adult product."

Probst himself got a similar explanation when he queried Amazon privately in his capacity as a publisher.

"In consideration of our entire customer base, we exclude 'adult' material from appearing in some searches and best seller lists," went the reply. "Since these lists are generated using sales ranks, adult materials must also be excluded from that feature."

However, explicit titles dealing mainly with sex between different genders still kept their Sales Ranks, such as porn star Ron Jeremy's memoir "The Hardest (Working) Man in Showbiz," former underage porn star Traci Lords' "Underneath It All" and "The Big Book of Porn: A Penetrating Look at the World of Dirty Movies."

Amazon had a different explanation later Sunday — that it had all been the result of a computer error.

"There was a glitch in our systems and it's being fixed," Smith e-mailed The Associated Press.

But then came a Monday blog posting by "Weev," an Internet "troll" so obnoxious he's been profiled in the New York Times.

"I guess my game is up!", he, or someone claiming to be him, wrote. "Here's a nice piece I like to call 'how to cause moral outrage from the entire Internet in ten lines of code.'"

In offensive and witty detail, Weev explained how he'd become annoyed by Amazon's user-based reputation system, which lets ordinary people tells Amazon administrators about offensive content, and decided to screw with it.

He wrote some quick UNIX/Linux code (which he provides) to grab the URLs of thousands of gay-themed books listings on Amazon.

Then he enlisted, so he says, sympathetic administrators at other Web sites to embed the code in their own Web sites so people who clicked on those sites would actually be reporting various Amazon titles as "offensive content" without their own knowledge.

At the same time, Weev says, he hired "third worlders" to sign up for new Amazon accounts and send him the "cookies" identifying each unique user.

With all that information, he was then able to automatically flag hundreds of gay-themed books as offensive and so remove them from Amazon's Sales Rank.

Another blogger tested Weev's code and said it didn't work — but that had it been less buggy, it would have.

Meanwhile, Mike Daisey, theatrical monologuist and author of "21 Dog Years" about working at Amazon, says the Sales Rank yank was the result of a French employee of Amazon confusing the codes for "adult," "erotic" and "sexuality."

That doesn't completely explain why books about straight pornography were unaffected, but Daisey says "the Amazon [editing] system is mostly hand-built, and often super idiosyncratic, very Millennium Falcon meets Battlestar Galactica."

Smith's account dovetailed with that theory.

"This problem impacted books not just in the United States, but globally," she wrote. "It affected not just sales rank but also had the effect of removing the books from Amazon’s main product search."

Some books had gotten their Sales Ranks restorted by midday Monday. Seymour's "All I Could Bare" had a Sales Rank, as did one edition of "Giovanni's Room" and Baldwin's equally gay-themed "Another Country."

But a more recent edition of "Giovanni's Room" did not, and neither did "The City and the Pillar" and "Oranges Are Not the Only Fruit."

Other titles without Sales Ranks included an anthology of gay American writing, "The First Time I Met Frank O'Hara," two serious-minded non-fiction works, "Homosexuality in Cold War America" and "The Gay Metropolis," as well the straightforwardly titled "Ellen DeGeneres: A Biography."

"Many books have now been fixed and we’re in the process of fixing the remainder as quickly as possible," Smith wrote. "We intend to implement new measures to make this kind of accident less likely to occur in the future."

The Associated Press contributed to this report.