Andrew Garfield Andrew Garfield

Spider-Man is returning to Marvel's web.

Marvel Studios and Sony Pictures Entertainment, which has retained the rights to Spidey since 1999, have finalized a deal under which a new Spider-Man will join the Marvel Cinematic Universe.

As part of the reboot, Spider-Man will first appear in an unspecified Marvel film, widely believed to be 2016's Captain America: Civil War, which pits Captain America (Chris Evans) and Iron Man (Robert Downey Jr.) against each other. Spider-Man plays a key role in the Civil War comics story line. Spidey will then get his own standalone film, scheduled to be released on July 28, 2017.

32 reasons 2015 is going to be amazing: A new Avengers movie and more

Marvel Studios President Kevin Feige and Sony's Amy Pascal — who's stepping down from her co-chair position — will team up for a "new creative direction" for the superhero, Marvel announced Monday. The plan is also for other Marvel characters to appear in future Spider-Man films from Sony.

Long before entering the film game, Marvel licensed Spider-Man to Sony Pictures to make the Tobey Maguire trilogy, the first of which was released in 2002. Though that franchise was a financial success, the more recent Amazing Spider-Man reboot with Andrew Garfield has been less lucrative and was criticized by fans. Garfield is not expected to return for the new reboot, according to BuzzFeed.

The Spider-Man deal had been speculated for a while. In December, leaked emails from the Sony hack revealed that Sony and Marvel were discussing a partnership and a revamp plan for the character.

Spidey's inclusion into the MCU has also shifted several release dates in the Marvel slate. Thor: Ragnarok got pushed backfrom July 28, 2017, to Nov. 3, 2017. Black Panther will now hit theaters July 6, 2018, instead of Nov. 3, 2017. Captain Marvel is slated for a Nov. 2, 2018, release, moving from July 6, 2018. Inhumans will move from Nov. 2, 2018, to July 12, 2019.

What do you think of the deal? Who should play Spider-Man?