The “Amazing Spider-Man 2” opens today overseas, and fans are already buzzing on Twitter over its end credits. The Sony Pictures release concludes with a teaser for the upcoming “X-Men: Days of Future Past,” a new sequence that has been added since “Spidey 2” premiered in London last week.

The montage, which features a blue Jennifer Lawrence as Mystique, is meant to mimic the coda scenes that conclude the Disney and Marvel Pictures juggernauts, including “Captain America: The Winter Soldier,” which introduce new characters.

But in the case of the “Avengers” films, Disney is promoting its own material. The Spidey situation is different: Sony, which owns the “Spider-Man” films, is plugging a rival studio’s product, since the seventh “X-Men” sequel is released by 20th Century Fox on May 23. (Marvel acts as a traditional licensor for the non-Disney-owned Marvel characters.)

Why would Sony do that?

The reason, Variety has learned, is that “Spider-Man” director Marc Webb had an existing contract with Fox Searchlight to helm another film following 2009’s “500 (Days) of Summer.” After “The Amazing Spider-Man” in 2012, Webb’s negotiations briefly stalled with Sony as he was caught in a tug-of-war with Fox. Eventually, Fox agreed to allow Webb to direct Sony’s “Spider-Man” sequel, but only if Sony would promote its “X-Men” film for free.

For Sony, there’s another benefit to the cross-promotion. It allows the studio to situate its movie in the same Marvel family as Captain America and Iron Man, even if the creative team behind those films — including star producer Kevin Feige — are separate. Many fans look forward to the much-hyped codas at the end of a Marvel film.

That said, some U.K. fans who saw “Spider-Man 2” on opening day were confused, wondering if it meant a single “X-Men” and “Spider-Man” movie is being planned. That’s not happening.