In an important expansion of the right of free speech, the Supreme Court ruled unanimously yesterday that Mississippi courts unjustly punished the NAACP and other civil rights protesters in 1979 by making them pay damages to white merchants they boycotted in an effort to obtain political power in Port Gibson, Miss.

Justice John Paul Stevens said the damages decision--which at one time threatened to bankrupt the NAACP--and a Mississippi court order to stop the boycott were unconstitutional prohibitions of peaceful political activity.

"Through speech, assembly and petition, rather than through riot or revolution," Stevens said, the protesters "sought to change a social order that had consistently treated them as second-class citizens." Unless there is proof that they acted violently, the political boycott enjoys the full protections of the Constitution, he said.

The ruling marks the first time that the court has explicitly protected the political boycott.

The case had major symbolic and practical significance for the NAACP, which is planning a new round of nationwide anti-bias boycotts, and announcement of the decision at the organization's convention in Boston yesterday set off an emotional outpouring.

For one delegate, one of the protesters sued by the merchants, the consequences were immediate. W.E. Camphor, 71, a retired teacher in Port Gibson, had a lien placed on his home as a result of the Mississippi ruling struck down yesterday. "Everything I have was at stake," he said.

The ruling, in NAACP vs. Claiborne Hardware Co., was also closely watched by the American Civil Liberties Union, organized labor, the American Jewish Committee, other civil rights organizations and the National Organization for Women, which has used boycotts against states voting down the Equal Rights Amendment.

The case dates to April 1966 when several hundred blacks led by Charles Evers, then field secretary of the Mississippi NAACP, organized the boycott of white-owned businesses in Claiborne County to protest segregated schools, hospitals and other public facilities, and the denial of public and private sector jobs to blacks in the county.

As it progressed, sporadic acts of violence, attempts at verbal intimidation and fiery speeches occurred. When the 17 white merchants filed suit in the Mississippi courts in 1969 to recover what they claimed was millions of dollars in lost business, they said those acts stripped the boycott of any constitutional protections.

The lower courts agreed and ordered an end to the boycott and the damages payments of $1.25 million to the merchants. The Mississippi Supreme Court ruled in 1979 that the damages award was excessive, but upheld the unprecedented holding that the boycott could be enjoined and 92 of its participants subjected to damages because they had agreed to use force and, in fact, used force.

The court reversed the Mississippi ruling yesterday in a 48-page ruling. Justice William H. Rehnquist agreed in the judgment but not in the opinion itself. Justice Thurgood Marshall, a former NAACP leader and counsel for the NAACP Legal Defense and Education Fund Inc., did not participate.

Stevens said that while the Constitution protects political boycotts, violence can "find no sanctuary" in the First Amendment. But in the Mississippi case, Stevens said there was no proof that whatever violence occurred was caused by the protesters, let alone by the NAACP. Liability cannot be imposed on everyone just because someone or a few may have committed violence, he said.

"Specific intent" to encourage violence must be found to hold a group liable. Otherwise, a form of "guilt for association" would apply.

He said the lower courts were wrong to hold that the "emotionally charged rhetoric" of Evers and others was grounds for imposing liability. "Strong and effective extemporaneous rhetoric cannot be nicely channeled in purely dulcet phrases," he said. "An advocate must be free to stimulate his audience with spontaneous and emotional appeals for unity and action in a common cause."

Stevens added that the merchants failed to show a direct relationship between their losses and individual alleged acts of violence or intimidation.

"Speech does not lose its protected character simply because it may embarrass others or coerce them into action . . . . A massive and prolonged effort to change the social, political and economic structure of a local environment cannot be characterized as a violent conspiracy simply by reference to the ephemeral consequences of relatively few violent acts . . . .

"It is impossible to conclude that state power has not been exerted to compensate the white merchants for the direct consequences of nonviolent, constitutionally protected activity," Stevens said.

Also yesterday, the court wrote the final chapter of a legal battle between the Black Panther Party and the government over charges that top federal officials conspired to destroy the group.

The justices threw out a lower court ruling that had ordered a federal judge to proceed with the Panther's $100 million damages suit against several federal agencies, including the FBI, CIA, Justice Department, Treasury Department, Internal Revenue Service and Postal Service.

The justices took the action at the suggestion of the Panthers, who notified the court April 12 that they were abandoning their claims "because they have exhausted their available resources to finance this litigation."

The controversy dates to 1976, when the Panthers said they first learned of the alleged conspiracy in a report by a special Senate committee on intelligence activities.

The party said the report revealed that the FBI created a special counter-intelligence program called COINTELPRO, primarily designed to "expose, disrupt, misdirect, discredit or otherwise neutralize the activities of black nationalists."