In 1977 Mahlon Delong, a 55-year-old potato farmer and a registered Republican, was serving as state director of the Farmers Home Administration in Maine.

The Carter administration had just taken office, and the agency's new administration phoned from Washington and asked him to resign.

Delong said he wouldn't quit because he hadn't done anything wrong. A few days later he was reassigned to the Agriculture Department here, answering routine mail in a crowded office.

Even though he kept his salary, which now has risen to about $47,600 a year, Delong sued to get back his old job, which was filled by a former Democratic member of the Maine legislature.

Yesterday a federal appeals court in Richmond strongly questioned Delong's transfer and spelled out new rules making it more difficult for an incoming administration to take action against employes who belong to the "wrong" political party.

Even though Delong has not won his case -- it still has to be heard again in U.S. District Court in Alexandria -- he was happy about the decision.

"That's good news," he declared in late afternoon just before joining a car pool for a half-hour ride to his apartment in Alexandria. "When you're right, you're right."

An Agriculture Department attorney said the department had not received a copy of the decision yet, and hadn't decided whether to appeal it to the Supreme Court.

In 14-page ruling, the 4th U.S. Circuit Court of Appeals said the government cannot impede an employe's rights to free speech and free political association by transferring or reassigning him.

Writing for a three-judge panel, Judge James D. Phillips declared that when someone is transferred for political patronage the issue is whether the employe faces "such a Hobson's choice between resignation and surrender of protected [constitutional] rights as to be tantamount to outright dismissal."

Attorneys for the Agriculture Department had argued that transfers for political patronage are not subject to the same constitutional limits as political firings.

In his ruling last year, District Judge Albert V. Bryan Jr, did not take up the issue of forced transfers. Instead, Bryan ruled on the basis of a 1976 Supreme Court decision that Delong's job in Maine was a "policy-making position" and thus had no legal protection.

But in a decision March 31, the Supreme Court made it harder for governments to operate a patronage system.

The question, the high court said, then "is not whether the label "policy-maker' or 'confidential' fits a particular position; rather the question is whether the hiring authority can demonstrate that party affiliation is an appropriate requirement for the effective performance of the public office involved."

The appeals court said Bryan would have to take this new test into account in deciding Delong's case.

Delong said he took the job as state director of the Farmers Home Administration, which makes home loans in rural areas, in 1970 after farming for 25 years. He said he sold his farm several years later because he thought he probably would stay in his position until he retired.

When he received the call from Washington asking him to resign, he said Gordon Cavanaugh, the agency director, explained, "We've had a change of administrations."

"Yes, I've heard about that," Delong said he replied. "If you think I've done something wrong, then you should fire me. If not, then I don't think I'm going to resign."

Less than a week later, he said he was transferred to Washington, and ever since, according to his court papers, "has had little or nothing to do . . . petty assignments to write insignificant or useless reports . . . or [work] normally done by employes with grades much lower than GS 15."