From the moment Marvel Entertainment formed its own studio to make movies based on its remaining in-house characters, fans have hoped Spider-Man, a Marvel character licensed to Sony, would return home to what they would later know as the Marvel Cinematic Universe. That wish was finally granted last night when a new deal between Marvel Studios and Sony Pictures Entertainment was announced. For all involved, the best case scenario has been realized even if the deal isn’t structured in fan-idealized form.

In the agreement, Marvel Studios will be able to include Peter Parker and his wall-crawling alter ego in an upcoming MCU movie. Afterward, Sony will release a new Spider-Man solo film on July 28, 2017, which will be co-produced by Marvel Studios President Kevin Feige and Sony’s Amy Pascal. Feige and Pascal will collaborate to take Spider-Man in a new creative direction. That is where the promises end for this deal, but the potential is much greater, if all goes well, and it will.

Marvel Studios does not own the rights to make Spider-Man movies. Sony still holds its license and the distribution rights and creative control that come with it. This could have some wondering what exactly changes and how Spider-Man is saved. After all, Sony is the studio that put the Web-Slinger in such a precarious position in the first place with two disappointments in the franchise’s last three films, SPIDER-MAN 3 (2007) and THE AMAZING SPIDER-MAN 2 (2014). Sony retaining creative control seems counter-intuitive, but will ultimately be a non-issue.

The main reason Sony Pictures Entertainment was willing to consider a deal like this in the first place was a lack of confidence in the studio’s own ideas for how to carry the franchise forward. This is reaching out and acknowledging the studio’s own need for help. With Kevin Feige co-producing, Marvel Studios has an important seat at the table and without question, Sony plans to listen. Marvel Studios has been a hit factory, enjoying an unprecedented level of success in developing superhero franchises.

Sony isn’t going to be petty and use its creative control to shoot down the best idea in the room just because it came from Marvel Studios. Conversely, Marvel knows its characters better than anyone, which means Feige and company will recognize those instances in which Sony has the better idea. Filmmaking is collaboration and Marvel is quite skilled in this arena.

Good faith is probably enough to keep everyone honest, as the mere existence of this deal shows. If that somehow fails, Marvel holds key incentive for Sony. Per last night’s press release, Marvel and Sony are, “exploring opportunities to integrate characters from the MCU into future Spider-Man films,” but there is no guarantee those opportunities will be realized, which means Marvel is protected.

Assuming Sony bosses want MCU characters to appear in Spider-Man’s solo adventures, and why wouldn’t they, the studio will have to be willing to play ball with Marvel Studios. If push comes to shove and Sony and Marvel disagree over a given creative element, Marvel has the ability to withhold the characters to which it still owns the rights. Basically, Captain America, Iron Man, Daredevil, and the like are all potential bargaining chips Marvel Studios can use at the creative negotiating table.

For Sony, holding on to the rights to Spider-Man protects the studio’s long-term interests. The financial incentives are obvious in the near future, but beyond that, Sony remains in a position where it can make whatever the studio feels is the best choice for Spider-Man in a far off future where the MCU may not exist in quite the form moviegoers see today.

In all likelihood, the Marvel Cinematic Universe will keep running along with little to no interruption. In the unforeseeable future, however, there is always a chance things could change. What if Kevin Feige takes on a bigger role at The Walt Disney Studios and is not as deeply involved in Marvel’s day-to-day operations and creative? Marvel Studios Co-President Louis D’Esposito and Senior Vice President of Production and Development Jeremy Latcham are each more than capable of taking over the reins, but who’s to say they haven’t accepted new roles when Feige’s hypothetical departure comes?

Much like Batman has flourished independent of any involvement with other DC characters on the silver screen, so has Spider-Man without the aid of Marvel’s universe. That can still happen in a world where the MCU is somehow less mighty than it is now and will be for the next several years. If the superhero genre is eventually paired back down to only the biggest individual franchises, Sony is wise to ensure its ability to serve as the Spider-Man moviemakers.

Moving away from unlikely disaster scenarios, Sony would surely be happy to keep making beloved, billion-dollar Spider-Man films with Marvel in perpetuity. The bottom line here is that no matter what happens with Marvel, Sony will have the opportunity to maximize its creative and financial opportunities for as long as audiences want to see any superhero movies at all.

This is also the best deal Marvel Studios could have reasonably hoped for without putting itself in a position where it would take several Spidey films to start turning a profit. Parent company Disney would have had to write an enormous check to buy the rights to Spider-Man outright. The only other alternative was waiting for however long it could have taken for Sony to completely exhaust the franchise, leading to audience rejection and significantly diminished value.

That day might never have come and even if it did, the well would be poisoned. Disney would still have to put up a lot of money while Marvel was forced to sit on Spider-Man and wait for audiences to start forgetting how much the character has disappointed them. It is better to strike now while audiences still want to watch Spider-Man films, as long as they’re good, and believe in the ability of the Marvel Cinematic Universe to provide them with a worthwhile entertainment experience.

This is the best case scenario not only for Marvel Studios and Sony Pictures, but also Spider-Man fans. Marvel Entertainment’s most popular character is finally coming to the MCU at a time when he can have the greatest impact. There are five Marvel Studios films coming between now and July 28, 2017. Spider-Man is going to be in one of them, perhaps playing a pivotal role in next year’s CAPTAIN AMERICA: CIVIL WAR. He could eventually team up with MCU heroes in his own film(s) before rejoining the big fun in AVENGERS: INFINITY WAR PART 1 (and 2).

Those possibilities which were once limited are now endless for Spider-Man. Take note, True Believers, this is what winning looks like.