The Supreme Court yesterday strengthened the barrier to prosecutors' violation of the constitutional privilege against compelled self-incrimination.

The court ruled, 7 to 2, that testimony given to a grand jury under a grant of immunity is "the essence of coerced testimony" and consequently cannot be used against the witness in a later criminal trial.

Justice Potter Stewart wrote the opinion for the court in a New Jersey case that, he said, posed the issue of Fifth Amendment protection against compulsory self-incrimination "in its most pristine form."

When a state immunizes a witness to procure his or her testimony for a grand jury, as did New Jersey, "there is no question whether physical or psychological pressures overrode the defendant's will," Stewart said. "The witness is told to talk or face the government's coercive sanctions, notably, a conviction for contempt."

In such a case, balancing of the privilege against the interests of the state "is not simply unnecessary," Stewart said. "It is impermissible."

The dissenters, Justice Harry A. Blackmun and Chief Justice Warren E. Burger, said the majority had engaged without authority in a "type of abstract adjudication of constitutional rights in a factual vacuum."

The case began in 1974, when a grand jury in Ocean County, N.J., subpoenaed Joseph Portash, mayor of Manchester Township, for an investigation into payments purportedly made by a real estate developer in exchange for favored treatment.

Portash expressed intent to claim the Fifth Amendment privilege. His lawyers and the prosecutor then agreed that if he would appear before the grand jury, neither his testimony nor evidence derived from it could, under New Hersey law, be used in subsequent criminal proceedings. After-ward, they tried but failed to come to an agreement that would avoid prosecution.

Before the trial, the judge, rejecting defense pleas, refused to rule that the state could not use Portash's immunized grand-jury testimony to impeach or discredit testimony he might give.

After the state completed its case, the judge ruled: If Portash were to testify in a way materially inconsistent with his grand jury testimony, the prosecutor could use the new testimony in cross-examination.

Portash's lawyer then advised him not to take the stand. The jury convicted him of accepting $32,000 from the developer. New Jersey appeals courts reversed, and were affirmed yesterday.