Comic book giant Marvel has settled its legal dispute with film studio Sony Pictures over Spider-Man merchandise.
The original Spider-Man was the most successful film of 2002
Marvel sued Sony in February 2003, claiming it had violated an agreement by using the web-slinging super-hero to promote other Sony products.
Sony countersued, saying Marvel had itself breached their licensing deal.
But Marvel announced on Tuesday it had reached an agreement that would give it "additional responsibilities". Spider-Man 2 is released in the UK on 15 July.
Marvel originally sued Sony Pictures Entertainment for $50m (£27m), saying the company had claimed exclusive merchandising rights to the popular comic book character.
It also claimed Sony violated the terms of their commercial pact by using the character to "cross-promote" other Sony releases.
Sony Pictures responded by accusing Marvel of trying to cheat the studio out of millions of dollars through shady accounting practices.
It also claimed the legal action was merely a ruse to enable Marvel to renegotiate the terms of the licensing deal.
The dispute was complicated by two other actions brought against Sony by the comic book company.
Marvel filed a $10m (£5.4m) suit against Sony's electronics division in June 2003, while a separate claim in January 2004 accused Sony of cheating Marvel out of merchandising royalties generated by the Men in Black film franchise.
All three actions were settled under Tuesday's deal, which will see Marvel exercise greater control over Spider-Man Merchandising LP, its joint venture with Sony.
Under the new deal, Marvel said it would be required to consolidate the financial results of the joint venture's operations into its own financial statements.
Spider-Man 2 is released in the US on 30 June and in the UK on 15 July
"We're happy with the way it got resolved," said a Sony spokeswoman. "It's very amicable."
The two companies will continue to collaborate on future Spider-Man sequels, including a third instalment scheduled for cinema release in May 2007.
They will also work together on films based on the Marvel characters Luke Cage and Ghost Rider.
Spider-Man 2, released in the US on 30 June, is expected to be one of this year's most profitable films.
The first Spider-Man movie was the highest-grossing film of 2002, making more than $800m (£430m) worldwide.