Retired Army general William C. Westmoreland today dropped his $120 million libel suit against CBS Inc., a week before it was to go to a federal jury, and both sides claimed victory in the 4 1/2-month court battle.

U.S. District Court Judge Pierre N. Leval received the agreement to end the case, which grew out of a 1982 CBS documentary, "The Uncounted Enemy: A Vietnam Deception," that Westmoreland charged had falsely accused him of misrepresenting enemy-troop figures to superiors including President Lyndon B. Johnson.

Westmoreland, 70, commander of U.S. ground forces in Vietnam from 1964 to 1968, said that the network had issued, in a jointly approved statement, the equivalent of an apology. "I consider that I won," he said.

CBS issued its own statement supporting the broadcast, which aired on Jan. 23, 1982, and said the network has the option of showing it again.

"Nothing has surfaced during the bitter legal battle that in any way diminishes our conviction that the broadcast was fair and accurate," Van Gordon Sauter, executive vice president of CBS Broadcast Group, said today. He also said he "personally does not view the statement as an apology."

The agreement involves no payment by CBS, and the network agreed not to sue Westmoreland for court costs.

CBS lawyer David Boies asserted that the joint statement today was what he said 18 weeks ago in his opening statement to the jury.

"If that's all they wanted, they didn't have to file a $120 million lawsuit. They didn't have to demand an apology," Boies said.

The general and his lawyers focused on a segment of the joint statement that said, "CBS respects Gen. Westmoreland's long and faithful service to his country and never intended to assert, and does not believe, that Gen. Westmoreland was unpatriotic or disloyal in performing his duties as he saw them."

"If that statement had been made after the CBS program had been aired, it would have fully satisfied me," Westmoreland told reporters at a news conference after Leval received the agreement to dismiss the case. The judge is scheduled to release jurors today.

Westmoreland filed suit against CBS in September 1982, claiming that he had been "rattlesnaked" in his interview with CBS narrator Mike Wallace and defamed by a broadcast that accused him of the equivalent of a breach of duty.

"We came here to clear the name of a general," Westmoreland's lawyer, Dan M. Burt, told reporters. "That is what I, in my heart, believe we have done."

Burt acknowledged that the lawsuit had been costly, with legal bills of more than $2 million for Capital Legal Foundation, his conservative public-interest law firm. He said the foundation is in debt "several hundreds of thousands of dollars."

At a separate news conference shortly after Westmoreland's, CBS attorney Boies maintained that Westmoreland, not CBS, had changed its position. CBS officials emphasized repeatedly today that the joint statement says only that Westmoreland was not unpatriotic "in performing his duties as he saw them," noting several times the words "as he saw them."

"I said in my opening statement to the jury that we were not challenging Gen. Westmoreland's motive for engaging in the deception," Boies said. "I said that when Gen. Westmoreland engaged in the deception it might very well be that he felt it was in the interests of his country . . . . "

Boies also denied that the joint statement was an "apology" from CBS.

Sauter said CBS considered the statement "equitable," adding that Westmoreland "may read into that statement whatever he wishes to read into the statement."

At issue in the case was whether the broadcast libeled the general when it portrayed him as the head of a "conspiracy" in 1967 to suppress higher enemy-troop numbers from the public, Congress and the president to maintain support for the war.

Boies said, "CBS states that -- as the broadcast did -- that Gen. Westmoreland misled the country, the public, the Congress and the president, and CBS stands by that report as fair and accurate."

Boies said Burt and Westmoreland "tried to get CBS to retract that, and CBS refused. CBS said that if that was a condition of dropping the lawsuit we would not agree to it."

Burt and Westmoreland portrayed the settlement as a mutual agreement that served both sides. "Nobody held a gun to their head and made them sign this," Burt said.

Burt had faced what he called today "a very tough standard" of proof in the courtroom. Late last week Leval informed lawyers of a crucial point in his proposed "charge" to the jury -- the guidelines a judge gives the jury before it considers its verdict.

Leval had proposed that on the two major issues Burt would have to prove with "clear and convincing evidence" that the broadcast was false and that the network had "reckless disregard" for whether it was false.

In addition, two key witnesses, retired colonel Gains B. Hawkins and retired major general Joseph A. McChristian, had given strong testimony supporting the CBS broadcast. Burt, in an interview today, dismissed as "ridiculous" any connection between the end of the lawsuit and that testimony.

The negotiations that ended the battle between Westmoreland and CBS evolved, according to interviews with participants, in the following way.

They began Wednesday afternoon when Burt called CBS general counsel George Vradenburg.

Burt said today that his call was "nothing new," that both sides had been in discussions constantly during the entire 2 1/2-year litigation.

Vradenburg recalled that Burt said that if there was "any chance of this case ending up before it goes to the jury, I'd like to talk about it."

Earlier discussions along the same lines had been fruitless. Burt, according to Boies, had insisted on an apology from CBS or a payment to Westmoreland or both. CBS officials said they had always refused to provide either.

At a breakfast meeting Friday, Burt asked Vradenburg if there was any way to resolve the case.

Vradenburg said the only statement that CBS would agree to make would be similar to one it would make if the jury returned a verdict in the network's favor.

Burt said that on Friday there was "a material change in CBS's position." He indicated that CBS appeared willing to agree to language that it had rejected before.

"At no point was a statement offered anything like what we have here offered by CBS ," Burt said.

He said he offered a "new twist."

Later that day, Vradenburg said Burt produced a one-page draft of a joint statement in which he suggested that CBS, in effect, say it had learned a great deal during the trial and that it would have done its documentary differently now.

Vradenburg said he called Burt the next day, Saturday, and told him he would try to draft a statement more acceptable to CBS. He sent it to Burt, who said it "looked interesting" and suggested changes that seemed mostly stylistic, Vradenburg said.

Burt said today he was "quite surprised when they said, 'We'll give you this language.' "

Vradenburg said he "was astonished at the course it was taking." Up to then he had not thought the negotiations were really serious.

Late Sunday morning, Burt received a go-ahead from Westmoreland and both sides met at Burt's hotel to hammer out an agreement, Vradenburg said. Early that evening, they called Leval's clerk to say agreement had been reached.