The Baltimore Orioles won a preliminary battle Wednesday afternoon in the burgeoning legal dispute with the Nationals over the Mid-Atlantic Sports Network when a New York Supreme Court judge enjoined an attempt by the Nationals and Major League Baseball to withdraw MASN’s rights to broadcast Nationals games, according to documents obtained by The Post.

After an MLB arbitration panel ruled in the Nationals’ favor over how rights fees from MASN should be distributed, the Orioles protested and contended they had a legal right to challenge a ruling they viewed as subjective. The Nationals had petitioned a judge to withdraw MASN’s right to show their games. Wednesday, the judge enjoined the Nationals so he could further study the issue and the process MLB used to rule in the Nationals’ favor.

Through a spokeswoman, the Nationals declined to comment.

The Nationals and Orioles have squabbled over revenue from MASN since the Nationals moved to Washington from Montreal in 2005. Orioles owner Peter Angelos opposed the relocation because he said it cut into his regional television territorial rights. MLB appeased him with a unique arrangement. He would own a share of the Nationals’ television rights through a regional sports network that broadcast both teams’ games.

Under the terms of the arrangement, the Nationals started with a 5 percent ownership stake in MASN. It has grown to 15 percent and will increase by 1 percent each year until the Nationals own 30 percent. Every five years, there would be a “reset” period allowing the Nationals to receive rights fees commensurate with the formula in the contract.

By fall 2011, the first “reset” period, television rights fees for professional sports teams had exploded. The Nationals and Orioles entered into a bitter dispute over how much MASN owed the Nationals. As of 2012, the Orioles proposed giving the Nationals $34 million in rights fees from MASN; the Nationals asked for between $100 million and $120 million.

The Orioles believe MLB stands to gain financially by the ruling in the Nationals’ favor. Rights fees and profits from television networks are viewed separately by MLB. Money earned from rights fees is subject to MLB’s revenue sharing agreement. Profit earned by a team-owned television network is not. If the Nationals received a larger rights fee, then, some of it would trickle back to MLB.