The five-year licensing agreement between Take-Two and World Wrestling Entertainment that helped keep the storied wrestling franchise alive, was thanks to some legal wrangling that saw the WWE and developer Yuke's write off an estimated $60 million in money owed the two, according to court documents.

Take-Two and the WWE signed an exclusive five-year licensing agreement for the WWE video game series in February. The first entry in the franchise, WWE '14, is due out this fall.

The companies said at the time that Yuke's, the Japanese studio behind THQ's WWE games, will pick up where it left off on developing its 2013 WWE title. Take-Two has hired the THQ Fight Team, the internal group that managed development and marketing of the WWE series; that team will report to 2K Sports' design team at Visual Concepts, the 2K-owned studio behind the company's NBA 2K and MLB 2K franchises.

Recent court filings in the THQ bankruptcy case walk through the process required to clear both WWE and Yuke's of the legal mire created by THQ's bankruptcy in order to land a new deal with Take-Two.

At the time of the bankruptcy, THQ owed the WWE about $7.6 million for royalties and marketing and it owed Yuke's $15 to $20 million in development fees. THQ also faced additional debts from future royalty payments to Yuke's.

In a Feb. 12 filing, the court agreed to cancel THQ's WWE license in exchange for the WWE waiving all future claims against the publisher and for royalty payments for the sale of any WWE games that were made during the Chapter 11 case.

Another agreement filed on the same day canceled THQ's development agreement with Yuke's, returned any equity THQ had in Yuke's and paid out the developer $250,000. In return, Yuke's agreed to waive any future claims.

Finally, a third agreement on the same day transferred assets related to the development and sale of WWE game to Take-Two. In exchange, Take-Two agreed to hire some of THQ's employees and to enter into a new agreement with WWE and Yuke's to develop future WWE games.

The agreements were all approved a week later, with the court noting that it eliminated damage claims that could have exceeded $60 million.