Robert J. diGrazia was properly fired from his job as Montgomery County police chief by County Executive Charles Gilchrist in 1978, a county circuit court judge ruled yesterday.

Judge Calvin R. Sanders said Gilchrist "met the burden of proof . . . that diGrazia would not have been continued even in the absence of disparaging statements" DiGrazia is alleged to have made about the police department.

DiGrazia, who was hired in 1976 by then-County Executive James Gleason, contended that Gilchrist fired him late in 1978 because of the chief's widely publicized criticism of the police department.

DiGrazia had said the police viewed the community "as the enemy" and that half the officers on the county force were psychologically unfit for the job.

Gilchrist's attorneys countered that diGrazia was fired "because of differences in policy between the chief and the county executive." Judge Sanders upheld Gilchrist's position yesterday.

Reached at his Gaithersburg home, diGrazia said he had no comment on the ruling. Since his firing, diGrazia has done occasional consultant work for police departments nationally.

During his turbulent two years as Montgomery County chief, diGrazia became known as an outspoken and controversial law enforcement administrator. Earlier he had gained a national reputation as an innovative police chief in Boston and St. Louis County, Mo.