The Supreme Court ruled 5 to 4 yesterday that high federal officials - possibly including the president - can be sued personally for knowing and deliberate violations of constitutional rights.

The court rejected the government's contention that absolute immunity from liability protects members of the Cabinet or other executives with discretionary power if they flout the limitations imposed on them by law.

The dissenters denounced the ruling, mainly because of "the potential for disruption of goverment that it invites."

Acting in a case involving the Agriculture Department, the justices said that such executives are entitled to a qualified immunity, which shields them if they acted in good faith and on reasonable grounds.

At the same time, the court ruled that absolute immunity protects officials whose special functions require it, such as administrative law judges or hearing examiners, and agency attornerys who present evidence in hearings.

"The broad authority possessed by these officials enables them t

"The extension of absolute immunity... to all federal executive officials would seriously erode the protection provided by basic constitutional guarantees," Justice Byron R. White wrote in the opinion for the court.

"The broad authority possessed by these officials enables them to direct their subordinates to undertake a wide range of projects - including some which may infringe such important interests as liberty, property and free speech," he said.

In a previous decision, the court held that federal law-enforcement agents were liable for warrantless and forcible entries into a citizen's home in pursuit of evidence.

Rejecting a government argument, White wrote that it "makes little sense" for such agents to be accountable "but that an official of higher rank who actually orders such a burglary is immune simple because of his greater authority." He added:

"Indeed, the greater power of such officials affords a greater potential for a regime of lawless conduct. Extensive government operations offer opportunities for unconstitutional action on a massive scale. In situations of abuse, an action for damages can be an important means of vindicating constitutional guarantees."

The reasoning of the court was dictated in part by a series of rulings in recent years that accorded only qualified immunity to various state officials - up to and including the chief executive of a state.

One of the rulings allowed a damage suit to proceed against high officials of Ohio, including Gov. James A. Rhodes, in connection with the deaths and injuries inflicted by National Guardsmen who fired on students during disturbances at Kent State University

"We see no sense in holding a state governor liable but immunizing the head of a federal department," White said. "Surely, federal officials should enjoy no greater zone of protection when they violate federal constitutional rules than do state officers," he said.

"To create a system in which the Bill of Rights monitors more closely the conduct of state officials than it does of federal officials is to stand the constitutional rule on its head," White wrote.

He noted that the situation can be changed by Congress, which is considtring legislation to make the government liable for consitutional and statutory wrongs committed against persons by federal employes.

In the dissenting opinion, Justice William H. Rehnquist, joined by Chief Justice Warren E. Burger and Justices Potter Stewart and John Paul Stevens, pointed out that the court continues to provide absolute immunity for prosecutors and judges. He cited a recent ruling protecting a state judge who, without a hearing of any kind, authorized the steralization of an unaware 15-year-old girl. White wrote the opinion for the court.

"...the cynical among us might not unreasonably feel that this is simply another unfortunate example of judges treating those who are not part of the judicial machinery as 'lesser breeds without the law,' " Rehnquist said.

He said that yesterday's decision will lead to "a significant impairment of the ability of responsibe public offcials to carry out the duties imposed upon them by law." Citing a "steady increase" in lawsuits against federal officials, he said. "It simply defies logic and common experience to suggest that officials will not have this in the back of their minds when considering what official course to pursue."