Amazon.com Inc. said an internal cataloging glitch inadvertently removed more than 57,000 books from its sales rankings and main search page.

The Seattle company was hit by criticism in recent days from the authors of affected books, mainly those focusing on gay themes. But Amazon said the problem was global, and affected other categories such as health, mind and body, reproductive and sexual medicine and erotica.

"This is an embarrassing and ham-fisted cataloging error for a company that prides itself on offering complete selection," wrote Drew Herdener, Amazon's director of communications, in an email.

Amazon declined to explain its cataloging process or what had gone wrong with it.

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