A federal judge here ruled yesterday that Gordon Peterson is legally bound to remain as anchorman at Channel 9 at least through June 1980 under the terms of his current three-year contract.

The ruling by U.S. District Judge Barrington D. Parker blocked Peterson's attempt to move to Channel 4, the NBC-owned station here, at least while his contract with WDVM remains in effect.

Peterson, who has been off the air since announcing his intention to join WRC on August 3, said late yesterday he hasn't decided what to do in the wake of the decision.

Peterson and attorneys for WRC had contended that his personal services contract with Post-Newsweek Stations Inc. was not assignable when Channel 9 was purchased by the Evening News Association in July of last year.

But Parker, in ruling for WDVM, said a June 26, 1978 bill of sale between the two broadcast groups specifically assigned to ENA "all right, title and interest, legal or equitable, to and under all agreements, contracts and commitments" which included the original 1977 contract with Peterson.

Moreover, said Parker, "there was no express provision in the 1977 [Peterson-PNS] contract concerning its assignability or nonassignability."

Peterson could elect to appeal Parker's decision, return to work at Channel 9, where his news program is the highest-rated such show in the D.C. market, or sit out the remainder of his contract, which currently pays him $155,000 a year.

Under the terms of the pact, he is barred from working for another TV station in the Washington market during the life of that contract, which expires June 30, 1980.

"I'm going to have to mull my situation over," Peterson said yesterday. "I haven't had a chance to talk it over with my wife yet. Maybe I'll become a gardener. Or maybe a brain surgeon.

"It's a funny thing," said Peterson. "You think you have control over your own life. And then you discover you don't."

In his 10-page decision, Judge Parker noted testimony during last week's trial in which "Edwin W. Pfeiffer, an executive officer of WDVM-TV, testified that Mr. Peterson allegedly stated 'if the Judge decides I should stay, I will stay.'

"Assuming that he did not overstate Mr. Peterson's position and that Mr. Peterson was quoted in appropriate context, the television audience of the Washington, D.C. metropolitan area should anticipate his timely reappearance as news anchorman for station WDVM-TV. Of course, the avenue of appeal is always available."

Yesterday, Peterson recalled the same conversation with Pfeiffer [vice president and general manager of WDVM] cited by Parker -- but said his remark at the time did not constitute "a pledge" to return to WDVM if the ruling went against him.

"That was the day [Aug. 3] I told Ed I was leaving and to his great credit, he tried to make it as easy as he could for me in our conversation. What I meant is only that 'we'll leave it up to the lawyers'."

Ron Townsend, WDVM station manager, said yesterday that "obviously we're very elated and I hope Gordon is on the air Monday night -- but we haven't talked to him yet."

WRC general manager John Rohreck said "we're disappointed that Judge Parker has decided against Gordon. WRC-TV entered into an agreement with Gordon in the goodfaith belief that he was free to make such an arrangement. The next decision is his."

Channel 4, in particular, finds itself in a box as the result of Parker's decision. At the time Peterson was signed, the station notified then co-anchor Jim Hartz that he was being returned to NBC News for reassignment. The popular Hartz's status is currently uncertain as top NBC News management awaits the arrival of new president Bill Small sometime later this month.

With the new season about to be launched on Sept. 17, WRC had planned to introduce Peterson with co-anchor Jim Vance that night, at the same time introducing John Buren, the new sportscaster, who replaces Nick Charles.

WRC officials indicated earlier this week that if the "unthinkable" occurred, a temporary solution might be the assignment of weekend anchor Sue Simmons with Vance during weeknights.

But yesterday Rohrbeck -- who had believed Peterson's legal claim would be upheld -- said no decisions had been reached about the anchor spot as yet.

Should Peterson appeal yesterday's verdict, or decide to sit out the remainder of his contract, WDVM in turn would have to fill his spot on the weeknight news.

There have been reports in local TV circles that Channel 9 has talked to Philadelphia newsman Ralph Penza, just in case, but Townsend yesterday refused to confirm or deny the reports.

Earlier this month, one WDVM executive told a reporter that "even if Gordon has indicated he doesn't want to work here anymore, we'll welcome him back. It'd be a tough six months or so, considering some of the morale problems, but I think it could work out."