The next Spider-Man movie will be a joint project between Sony Pictures Entertainment and Marvel Studios, with Kevin Feige and Sony's outgoing chairman Amy Pascal signing on as producers.

Spider ManAndrew Garfield will likely carry on as Spider-Man in Marvel's future projects for the character

Under the new deal, Spider-Man will next appear in a Marvel movie that is part of the studio's cinematic universe, with The Amazing Spider-Man 3 - or whatever it's going to be called - which will be released on July 28, 2017. 

It's a smart move for all parties, given the character's decline in stock in recent years. The Amazing Spider-Man 2 wasn't the record breaking blockbuster that Sony had touted and Andrew Garfield has hardly set the world alight with his portrayal of Peter Parker. The British-American actor will stay on as Spidey, though the Marvel factor could reignite the franchise.

More: Sony leak reveals Marvel tried to enlist Spider-Man for Captain America: Civil War

Marvel under Feige has enjoyed a remarkable run of box-office hits and will likely break the all-time record with The Avengers: Age of Ultron. Next up is the sort-of-risky Ant Man with Paul Rudd, though the studio had a massive surprise hit with Guardians of the Galaxy last year and is thriving financially.

Bob Iger, Chairman and CEO of the Walt Disney Company said in a statement: "Spider-Man is one of Marvel's great characters, beloved around the world. We're thrilled to work with Sony Pictures to bring the iconic web-slinger into the Marvel Cinematic Universe, which opens up fantastic new opportunities for storytelling and franchise building."

Michael Lynton, Chairman and CEO of Sony Pictures Entertainment: "We always want to collaborate with the best and most successful filmmakers to grow our franchises and develop our characters. Marvel, Kevin Feige and Amy, who helped orchestrate this deal, are the perfect team to help produce the next chapter of Spider-Man,. This is the right decision for the franchise, for our business, for Marvel and for the fans."

More: Is Spider-Man is so amazing - why isn't he in The Avengers?