The rapid unraveling of the unorthodox deal between Sony Pictures and Marvel Studios to co-produce Spider-Man, and permit the iconic hero to be part of the Marvel Cinematic Universe, raises plenty of questions, not the least of which is: How did Sony come to control the film rights to Marvel's most recognizable superheroes? For the answer, we have to look back to the 1980s.

Decades before Marvel even dreamed of producing its own films, the comic book publisher licensed its characters for, first, animated television and, then, live-action. While projects like "Spidey Super Stories," the The Electric Company shorts, and the Japanese Spider-Man, hold a special place in pop culture, the only legitimate success for Marvel was The Incredible Hulk, which aired from 1977 to 1982. The less said about Dr. Strange, the 1978 made-for-TV movie, the better.

RELATED: Marvel/Sony Spider-Man Break-Up Could Make D23 Slightly Awkward

Although Warner Bros. found success on the big screen with Superman and Superman II, by 1985 superheroes had lost their luster for Hollywood, thanks in no small part to Superman III and Supergirl (little did anyone know that Howard the Duck was a year away). Looking to license the film rights to Spider-Man, Marvel found few takers, until Cannon Films came knocking.

Known as a producer and distributor of low- to medium-budget films like Cheerleaders Beach Party, Death Wish II and Enter the Ninja, Cannon paid Marvel a reported $225,000 over a five-year option -- that's about $536,500 in today's money -- plus a percentage of profits. If a Spider-Man movie wasn't made by April 1990, the rights would revert to Marvel. Cannon spent another $2 million on 10 different scripts, but couldn't secure backing for the film, and so began the wall-crawler's journey down a tangled web of overlapping and confusing agreements.

The nearly bankrupt Cannon was acquired by Pathe Communications, which, in April 1989, conveyed the Spider-Man rights to 21st Century Film Corp. as part of a contract-termination agreement. By July, 21st Century -- which produced the 1980 Captain America film -- struck a new deal in which the rights would revert to Marvel if a Spider-Man film wasn't made by 1992. That didn't happen, either.

RELATED: Spider-Man Fans Organizing Protest of Sony Studio Lot

Perplexed? It gets worse. In a bid to secure financing, 21st Century sold TV rights for the film to Viacom, home video rights to Columbia, and theatrical rights to Carolco Pictures, the producer of Terminator 2: Judgment Day, Total Recall and Basic Instinct. James Cameron signed on to write the script for a film whose budget ballooned from $15 million to $50 million. Everything finally looked rosy for Spider-Man. For a moment, at least.

Although splitting up the rights was a good way to raise quick cash, by 1993 there was a tangle of lawsuits and counter-suits involving 2st Century founder Menahem Golan, Carolco, Viacom and Columbia. 21st Century filed for bankruptcy in 1994, and its film library was purchased by Metro-Goldwyn-Mayer, which then sued Viacom, Golan and Marvel. MGM claimed at one point that its purchase of 21st Century's assets entitled it to a perpetual license to make Spider-Man films, but in 1995 a judge determined that the rights Marvel sold in 1985 to Cannon had, indeed, expired.

Marvel emerged from its own bankruptcy in 1998, and settled with Viacom and MGM, freeing the company to sell the Spider-Man film rights in 1999 to Columbia parent company Sony Pictures for a reported $7 million. That, of course, cleared the way for Sony to develop and produce 2002's Spider-Man, directed by Sam Raimi and starring Tobey Maguire.

RELATED: Tom Holland's Father Believes His Son Will Remain Part of the MCU

Marvel has historically maintained a cozier relationship with Sony than it had with Fox (before its acquisition by Disney), but it's nevertheless complicated. In need of short-term cash, Sony sold the Spider-Man merchandising rights back to Marvel in 2011. While Sony later admitted it regretted that decision, it kept Marvel invested in the success of the Spider-Man films; if the movies do well, sales of associated toys, logically, increase. And shortly before Disney announced its purchase of Marvel in 2009, Sony returned the Spider-Man television rights, reportedly "in exchange for some concession vis-a-vis the live-action Spider-Man features." Although the details were never released, the agreement apparently doesn't prevent Sony from developing plans for Spider-Man: Into the Spider-Verse television spinoffs.

The most recent Spider-Man film, director Jon Watts’ Spider-Man: Far From Home stars Tom Holland, Samuel L. Jackson, Zendaya, Cobie Smulders, Jon Favreau, JB Smoove, Jacob Batalon and Martin Starr, with Marisa Tomei and Jake Gyllenhaal. The film is currently in theaters, and will see an extended edition re-release featuring "approximately four additional minutes of a never-before-seen action sequence." The new cut hits theaters on August 29, just ahead of the Labor Day Weekend, and will also be available in IMAX in select locations.

KEEP READING: Dearth of Spider-Man: Who Else Can Replace Tony Stark As the MCU's Heart