A California judge on Tuesday shot down a lawsuit filed by former Panama dictator Manuel Noriega after his likeness appeared in a "Call of Duty" video game.

State Judge William Fahey sided with video game publisher Activision Blizzard, granting a motion to dismiss a lawsuit that creators of the game had decried as "frivolous."

"This ruling is an important victory and we thank the court for protecting ," said former New York City mayor Rudy Giuliani, who was part of the 's legal defense team.

"This was an absurd lawsuit from the very beginning and we're gratified that in the end, a notorious criminal didn't win."

Giuliani touted the ruling as a blow for all creators of films, books, video games, or television shows that include portrayals of historical figures.

"Today's ruling is a victory for the 40 million dedicated members of our Call of Duty community and global audiences who enjoy historical fiction across all works of art," Activision chief executive Bobby Kotick said in a release.

Stories in the blockbuster "Call of Duty" military shooter franchise are inspired by historical events, according to Activision.

Installments of the game have featured Fidel Castro, John F. Kennedy, and Noriega.

Activision had asked the judge in September to toss out the lawsuit on the grounds that giving a small part to a Noriega character in "Call of Duty: Black Ops II" was protected under the law as free speech.

The suit filed by Noriega two months earlier accused those behind the of exploiting his likeness without permission by making him a traitorous on-screen villain.

The next installment of the multi-billion-dollar franchise, titled "Call of Duty: Advance Warfare" will be released next week.