"We said the photos were parodies of the Barbie dolls and made fun of the image they project," said Annette Hurst, a San Francisco attorney who worked on the case.
U.S. District Judge Ronald Lew agreed, ruling on Monday that because the photographs were a parody they did not hurt Mattel's marketing of the doll.
Artist Tom Forsythe of Kanab, Utah, had used the dolls in a series of photos titled "Food Chain Barbie" to criticize "Barbie's embodiment of America's culture of consumption and conformism.
"I was using the Barbie doll to criticize the impossible 'beauty-ness' and to make a statement about commercialism," he told CBS Radio News." If we try to consume that as food, we're going to end up with indigestion."
The El Segundo-based toy maker said it would appeal.
"Mattel is very disappointed that Judge Lew failed to take into consideration that consumers do not view Mr. Forsythe's photographs as art or as parody and that a substantial number are confused into thinking that Mattel sponsors his goods" the company said in a statement.
Lew also ruled that Mattel did not show it would suffer economically as a result of any consumer confusion.
Forsythe's photographs show Barbie dolls doing household chores or posed in sexual positions. One doll was shown wrapped in tortillas.
Forsythe maintained he had a right to use Barbie dolls to criticize "the materialistic and gender-oppressive values he believes the doll embodies," according to an ACLU statement.
"This case really shows that might doesn't always make right, that if you're willing to take the risks and fight people, particularly large corporations that are attempting to silence you because they don't like what you have to say, you can win," he said.
Monday's setback wasn't the first for the toy maker in the case titled Mattel vs. Walking Mountain Productions.
In February, the 9th U.S. Circuit Court of Appeals upheld a lower court's decision to deny Mattel's request to bar Forsythe from using the doll in his photographs.
In September, Lew denied a request to place a preliminary injunction against Forsythe barring him from using the doll and selling the photos as postcards.
©MMI CBS Worldwide Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report