Brie Larson as Captain Marvel, the first female superhero lead for Disney's blockbuster comic book movie business, and 'the most powerful character' Marvel has come up with yet, according to the company's president. Marvel Studios

Studios will go to great lengths to keep plot twists from moviegoers, but for big-budget franchises it can be pretty difficult to keep all those secrets under wraps. Movies with merchandise tie-ins must walk a fine line when working with their licensing partners. The studios have to offer partners enough information so that the manufacturers can create products to go with the film, but they don't want to give away too much and risk spoiling the film. Companies such as Disney have purposely withheld certain toy products from hitting the market until after a movie has been released in order to prevent spoilers. In 2015, Disney waited until after "Star Wars: The Force Awakens" was in theaters for several weeks before releasing Rey toys that featured her holding Luke Skywalker's old lightsaber. They also held back figurines depicting Kylo Ren without his mask to keep the mystery alive. But not all studios have been able to protect against fans learning about plot twists and character cameos from merchandise released before a film. Here are nine instances when merchandise tie-ins spoiled movies. (Beware, spoilers ahead.)

An interstellar cameo is coming

Although "Captain Marvel" has yet to hit theaters, fans are eagerly awaiting the March release. Comic lovers have scoured the trailers for hints of what is to come and which characters will appear, but the line of merchandise that is accompanying the film has provided the most clues. Eagle-eyed fans discovered that the action figure of Genis-Vell, a prominent character in the comic series, contains a hint that he may show up in the upcoming film. "Recreate Genis-Vell's Captain Marvel scenes with this 6'' action figure from the Marvel Legends Series," the product description says on Disney's website. This is particularly interesting considering Marvel has greenlit an "Eternals" movie to be released after "Avengers: Endgame," which will hit theaters in April. In the comics, Genis-Vell is implanted with false memories and believes Starfox, who is part of a race of superhero-like beings called the Eternals, is his father. Starfox is expected to be featured prominently in the upcoming "Eternals" film. Oh, and Starfox just happens to be the brother of Thanos, who has been the central villain in the "Avengers" saga.

Disney

Jude Law isn't Mar-Vell?

Since it was announced that Jude Law was cast in "Captain Marvel," fans have predicted that he would be playing Mar-Vell, a Kree warrior and teammate of Carol Danvers. However, a Funko Pop! collectible seems to have shed doubt on that prediction. Of the more than a dozen figures released by the company, none are of Mar-Vell. However, one is of Yon-Rogg, a Kree military commander who becomes a villain in the comic series.

Funko

Death foretold

"Star Wars: The Phantom Menace" introduced a number of new characters to the iconic franchise when it was released in 1999, including Jedi Master Qui-Gon Jinn, the mentor of a young Obi-Wan Kenobi. While fans knew what would become of "Old Ben Kenobi" and young Anakin Skywalker, the rest of the characters' futures remained a mystery. That is unless you purchased the "Phantom Menace" soundtrack before going to see the movie. The album featured two songs that foreshadowed Qui-Gon's death. One was called "Qui-Gon's Noble End," and the other was "The High Council Meeting and Qui-Gon's Funeral." Oops.

Disney

Goodbye, Mjolnir. Hello, Stormbreaker.

Fans were heartbroken when Thor's iconic hammer, Mjolnir, was busted to bits by his evil sister Hela in "Thor: Ragnorak." The weapon was not only a character in its own right in the comics and the films but an integral part of Thor himself. How was Thor going to take on Thanos without it in "Infinity War?" Fans got their answer ahead of the film's release in the form of an action figure and a roleplay axe called Stormbreaker. Comic book lovers recognized the weapon as one with the power to kill Thanos. Keen observers also noted that Thor was no longer sporting the eye patch he had garnered during a fight with Hela in "Ragnorak."

Amazon

Superman lives

Heading into "Justice League," fans were expecting Superman to make an appearance. While the iconic superhero died during the events of "Batman v. Superman: Dawn of Justice," a post-credit scene suggested that he was, in fact, alive. Trailers for "Justice League" purposefully avoided showing any signs of the hero. However, the toy line wasn't so coy about his return. Superman was featured prominently in several action figure sets, and it was made clear that he had a major role in the film.

Amazon

And the villain is ...

There's no film series more perfect for translation into toys than the "Toy Story" franchise. However, a major plot point was teased with the release of the "Trash Compactor Escape" set from Lego. Not only did it feature the big sequence from the finale of the film "Toy Story 3," but it showed Lots-o'-Huggin' Bear as the villain. "The evil Lotso is planning on getting rid of the other toys once and for all," the back of the box teased.

Amazon

A 65-foot-tall Ant-Man

The "Civil War" plot line in Marvel comics is a much beloved and pivotal moment in the Avengers' history, as the team becomes severed and members ultimately fight against each other. While "Captain America: Civil War" deviated from the original story line to fit the Marvel Cinematic Universe, it remained a hotly anticipated film for fans. Moviegoers knew that Ant-Man would make an appearance but had no clue that the character would deviate from his traditional shrinking to growing more than 60 feet tall. That is, unless they saw the 6-inch Funko Pop! called Giant-Man or the Lego "Superhero Airport Battle" set.

Amazon

The Dark Side twist

For fans of the late Christopher Lee, it should have come as no surprise that the iconic actor's character in "Star Wars: Attack of the Clones" would likely be a villain. After all, Lee was known for his portrayal of the evil wizard Saruman in "The Lord of the Rings" trilogy and, of course, Dracula. However, the toy tie-in for the film gave away the allegiance of his character, Count Dooku, even before the film hit theaters. The action figure not only shows the character with his curved red lightsaber, but also refers to Dooku as a "Dark Lord." Similarly, the packages of toys for the first "Star Wars" prequel film, "The Phantom Menace," gave away the twist that Padme was actually Queen Amidala in disguise.

Amazon

A not-so-secret transformation

"Shrek" was marketed as an unconventional fairy tale ahead of its release in 2001. Audiences learned how unconventional after main character and human princess Fiona permanently transformed into an ogre at the end of the film. However, some moviegoers may have been aware of the twist thanks to a Burger King kids' meal toy. It was a figurine that showed the transition of Fiona from human to ogre.

Shrek and Fiona from "Shrek" Chris Polk | FilmMagic | Getty Images