Fred Halstead, a Socialist Workers Party activist of middle age, spoke for many in the movement as the party's suit against the government proceeded here last week.

"I've been waiting for this trial my whole life," he said, "but I didn't think I'd be the plaintiff. I thought I'd be the defendent."

He is 55, a third-generation Socialist, and a member of the Socialist Workers Party for 33 years. Like many in the party, he claims that as long as he has been a Socialist he has been hounded by the government, losing his job as a merchant seaman as a young man, receiving anonymous hate mail as an adult.

Now, however, it is the federal government, rather than Halstead, which is on trial.

Considered one of the most significant civil liberties cases in litigation -- and the first major test of alleged government harassment aimed at a political group -- the Socialist Workers' $40 million civil suit has been quietly going on in U.S. District Court here since the beginning of April with only a few dozen blue-jeaned Socialist Party members in attendance, and is expected to last until June.

Basing many of its claims on documents received under the Freedom of Information Act, the suit accuses the FBI and 11 other government agencies of having infiltrated the party with more than 300 FBI agents, using a number of "covert methods of surveillance," and waging a "campaign of disruption and defamation." It also asks that the government be prevented from similar actions in the future.

The government does not dispute that an "intelligence gathering" took place. But it maintains that the FBI investigation of the Socialist Workers Party was "a legitimate good-faith investigation for both criminal and intelligence purposes" and that "the FBI has been authorized, since the days of President Roosevelt, to conduct intelligence-gathering activities in this country."

"The issue," the government said, in a pre-trial memorandum, "is whether the government has a right to keep itself informed on the activities of groups that openly advocate revolutionary change in the structure of the government, even if such advocacy might be within the letter of the law."

The government also claims that the suit -- which has been tied up in the courts since its filing in 1973 -- is now outdated.

"It's really a bit of an anachronism," said chief government counsel Edward Williams, a 38-year-old assistant U.S. attorney and Dartmouth graduate who had never heard of the Socialist Workers until coming on to the cause two years ago. "They are objecting to things that are no longer a part of the government. There are no informants in the Socialist Workers Party, the investigation ceased years ago, and there are new guidelines promulgated by the Justice Department pertaining to the FBI that tighten up the instances in which domestic security can be used . . . they're concerned about activities which have ceased . . ."

To Williams, the sixth assistant U.S. attorney to be assigned the suit in the past eight years, the trial -- though he dutifully notes the "important Fourth Amendent questions, the separation of powers between the judiciary and the executive branch" -- is clearly just another case, the Socialist Workers philosophy not terribly compelling.

"How do you like my background reading?" he says, with a nod towards the shelves of Lenin and Marx and Engels in his office. "You read these, you don't have to take sleeping pills."

That attitude is in marked contrast to the Socialist Workers' lead counsel, an earnest 36-year-old party member named Margaret Winter, who is working -- like the five other members of her team -- at a fee of $110 a week. Winter, a graduate of Georgetown University, says her mother was very worried about what she would wear in court and contributed clothing, though had she not, the party would have of course supplied the clothes. As for living on $110 a week, it was difficult when she first arrived in New York from Washington, but now it has improved.

"My companion is a pipefitter for ConRail," she explains.

She has been working on the case for six years, but became lead counsel only on the eve of the trial, when Leonard Boudin -- the well-known advocate who had championed Daniel Ellsberg and spent eight years on the Socialist Workers' suit -- left in a disagreement.

Neither will reveal the disagreement. But Winter will, in a quiet and almost emotionless voice, discuss the issues.

"The government says that because we advocate revoluntionary-socialist ideas, we do not have constitutional rights," she says. ". . . . for 45 years they have blacklisted our members, gotten them fired from their jobs, used surveillance and poison pen letters. They've claimed it was because we advocated violent overthrow of the government -- we're really clear on that, we don't advocate violent overthrow of the government -- but in 45 years of investigations, they have yet to indict us."

But why, having been allegedly harassed for so long, did the Socialists wait until '73 to file suit?

According to Winter, and to Socialist national secretary Jack Barnes, it was the changing mood of the country, a skepticism toward government having to do with Watergate, Vietnam, civil rights.

"If you had filed this suit in the '50s, you would have been laughed right out of court," says Barnes. "Vietnam changed all that. Still, in '73, when we filed suit, we filed what we suspected, now what we knew . . . not until the Freedom of Information Act, five years later, did we find out the extent . . ."

Barnes claimed there had been negotiations, between the Socialist Workers and the Justice Department, to settle the suit out of court, with $1 million offered by the government. "They told us to accept the settlement because under Reagan we would get a much worse deal." He also claims that the offer was rejected by the Socialists because it did not include a guarantee that the party would not be investigated sometime in the future. (Attorneys Winter, Boudin and Williams declined comments on negotiations, confirming only that they had taken place. Williams, who said he had not participated in the negotiations, said that the $1 million figure seemed high.)

Those feelings were echoed by Socialist Party member Halstead, a Los Angeles garment cutter, who came to New York to testify for two days.

Under direct examination from a party attorney he told of being bounced from the merchant marine for "being a subversive"; of anonymous hate mail; of having his car broken into and his briefcase stolen while he was addressing an anti-war rally at a church in San Francisco.

"When I obtained documents under the Freedom of Information Act, I learned the FBI had my briefcase," Halstead testified.

An assistant U.S. attorney took the floor to point out that the same documents noted that the briefcase had been found and turned over to the FBI by a Catholic priest.

"I wasn't speaking in a Catholic church," said Halstead.