WILMINGTON, Del. (AP) -- A Chancery Court judge ruled in favor of the World Wrestling Federation on Tuesday in its contract dispute with USA Networks.

USA Networks filed suit against the WWF claiming it negotiated a deal with Viacom while still under contract with USA Networks. The plaintiffs also claimed they matched Viacom's offer and should retain the cable television rights to the WWF's popular events.

"We have had a long and mutually successful relationship with USA Networks. At this time we simply have a better and more comprehensive partnership with Viacom that utilizes all of its media platforms and related companies," said Linda McMahon, chief executive officer of World Wrestling Federation Entertainment Inc.

"We are obviously pleased by the decision," said Mel Karmazin, Viacom president and chief operating officer. "This is a huge win for WWFE as they continue to build their powerhouse brand, and a huge win for Viacom as we look to capitalize on the incredible breadth of our media holdings to drive our growth and financial performance."

The five-year agreement with Viacom includes the airing of WWF programs, promotion of the programs on television, radio, and billboards, the creation of WWF television specials and a one-hour drama series, pay-per-view events in Canada, and events at Viacom's Paramount Parks.

As part of the agreement, Viacom also will take a 3 percent equity stake in WWFE, the WWF and Viacom said in a statement.