Foreign Service officers who work for the State Department and other federal agencies cannot be forced to retire at the age of 60, a three-judge federal court ruled here yesterday.

The judges ruled that the forced retirement age, which affects hundreds of federal employees here and world-wide each year, is unconstitutional because all federal government workers may continue working until they are 70 years old.

"This system is patently arbitrary and irrational," the judges said in a unanimous ruling banning the earlier retirement. It was signed by U.S. Circuit Judge Roger Robb and U.S. District Judges Thomas A. Flannery and Gerhard A. Gesell.

Attorney Zona F. Hosteller, who represented the plaintiffs in the case, said she believes the ruling is the first in which any court has struck down a mandatory retirement system of any sort.

The State Department had claimed the practice was warranted because the department was trying to create advancement opportunities for younger people and because the overseas work required of Foreign Service officers presented "unusual physical and psychological difficulties."

The first argument was rejected by the judges because they said it was "inherently discriminatory" to recruit and promote younger people solely because of their youth.

The second argument also was rejected after attorneys for the plaintiffs pointed out that more Americans worked overseas in similar jobs under Civil Service regulations that let them work till 70 than under the contested Foreign Service regulations.

Among those Americans who are allowed to work overseas past the age of 60 are Peace Corps volunteers, who, the judges noted, "unlike Foreign Service personnel, often live among the poorest segments of the local populace and face any adverse conditions that may exist."

The judges also looked at the Peace Corps experience of over-60 voluteers to reject another State Department argument that older persons were more likely to need medical attention they could not get overseas.

The judges said the result was that the plaintiffs "have convincingly shown that reaching age 60 is itself no bar to government employment overseas."

For example, the judges pointed out that more than 58,000 Americans civilians worked overseas for the government in 1976 and only 4,800 of them were under Foreign Service regulations that forced them to retire at the age of 60.

"We are faced with a situation where 10s of thousands of Americans are working for the United States government overseas and only a tiny percentage are singled out for early retirement," the judges said.

"Yet this small group does not appear to serve under any more difficult conditions that the others, nor do they seem to serve for a significantly longer period of time," the judges added.

The ruling came in a case brought by former information officer Holbrook Bradley and other Foreign Service personnel who were or would have been forced into retirement at the age of 60 and an organization whose membership includes such federal employees.

Affected by the Foreign Service regulations are employees of the State Department, the U.S. Information Agency and the Agency for International Development.

Any of those employees who participate in the Foreign Service Retirement and Disability System - other than a career ambassador or chief of mission - must retire at the age of 60 unless the Secretary of State makes a special determination to allow the employee to stay on another five years.

Exact figures on the number of persons forced to retire at the age of 60 were unavailable yesterday afternoon from a State Department employee, who said he had the figures but did not believe he was authorized to release them.

Others familiar with the process said the actual number of forced retirements may not be significant, since the knowledge of the forced retirement system and other personnel procedures within the State Department prompted even earlier retirements by many Foreign Service officers.

Government attorneys said they had not yet decided whether they would appeal the decision.