By Mike Colias

A federal judge dismissed a General Motors Co. lawsuit accusing Fiat Chrysler Automobiles NV of bribing union officials to gain an advantage on its labor costs, in an unusual legal standoff between rival automotive giants.

GM in November filed a civil-racketeering lawsuit against Fiat Chrysler, claiming the Italian-American auto maker intentionally hurt GM by paying off United Auto Workers leaders to win more-favorable contract terms for union-represented factory workers.

On Wednesday, U.S. District Judge Paul Borman said GM failed to show it was the primary victim of any alleged racketeering activity that Fiat Chrysler officials may have engaged in.

Instead, the alleged primary victims were rank-and-file UAW workers, who would have received lower pay from any attempt by Fiat Chrysler to lower labor costs, the judge concluded. "GM suffered only indirect competitive harm," he said.

GM said it plans to continue pursuing the case and believes there is evidence to show that Fiat Chrysler employees engaged in racketeering that harmed GM. "The district court's opinion is contrary to well-settled RICO case law and would let wrongdoers off the hook for the massive harm caused by their criminal conspiracy," the company said.

A Fiat Chrysler spokesman didn't have an immediate comment.

The case's dismissal is a rebuke to GM Chief Executive Mary Barra, who believed Fiat Chrysler intentionally took steps to put GM at a disadvantage, and felt strongly about pursuing a legal case, people familiar with the matter said.

Legal experts had described GM's civil-racketeering suit as unusual and a long shot, noting that such cases often are settled or dismissed because of the difficulty of proving the company was the primary victim of the alleged corruption.

In a civil-racketeering case, a court typically considers claims from only the primary victim of the alleged corruption, legal experts have said. In his dismissal, the judge said any competitive disadvantage suffered by GM as a result of Fiat Chrysler's lower labor costs would have been an indirect injury.

--Nora Naughton contributed to this article.

Write to Mike Colias at Mike.Colias@wsj.com