SAN FRANCISCO — In an antitrust case that sounded an alarm in Silicon Valley, a federal judge has thrown a wrench in the merger of two little-known social commerce companies.

In a 141-page order issued Thursday evening, U.S. District Judge William Orrick III sided with the government that Bazaarvoice’s purchase in 2012 of its main rival PowerReviews would likely stifle competition in the field of online ratings and reviews.