Removing an impediment to one of the largest media mergers in United States history, a Manhattan Supreme Court justice has ruled that plans to unite the operations of Viacom Inc. and CBS Corp. do not represent a repudiation of Viacom’s contractual commitment to build the United Paramount Network as a so-called “fifth network.”

Viacom’s partners in the UPN joint venture sought to block the merger, arguing that Viacom’s ownership of CBS, one of the four established broadcast television networks, would prevent Viacom from living up to the terms of the 1994 joint venture agreement that created UPN.