After he agreed to cooperate with authorities, admitted spy John A. Walker Jr. confided to a friend that he would ''make up stories'' and implicate Jerry A. Whitworth in the spy ring, the friend testified Tuesday.

The testimony came as Whitworth's attorneys began their defense of the accused spy. Attorneys for the retired Navy communications specialist tried to show the jury that Walker, the key witness against Whitworth, 46, charged with 13 counts of espionage and income tax evasion, is accused of membership in a U.S. Navy spy ring headed by Walker, a retired Navy chief warrant officer.

The government has described the spy ring as the most damaging to operate against the United States in 30 years.

In today's testimoy, June laureen Robinson, who was a partner in Walker's private detective business in Norfolk, described Walker as a habitual liar who had committed perjury in previous trials.

She also testified that Walker told her after his arrest on espionage charges on May 20, 1985, that he would help federal law enforcement authorities unravel the spy ring he can for the Soviet Union for 17 years.

But Walker also told her that he ''made a fool out of the government'' by getting the authorities to reduce the number of charges against him in exchange for his cooperation, she told the court.

Walker pleased guilty to espionage last October and agreed to testify against Whitworth. Walker faces life in prison, but his attorneys said he agreed to the plea bargain to secure a lighter sentence for his son, Michael L. Walker, a Navy seaman who was sentenced to 25 years in prison.

Robinson said that Walker told her he would ''make up stories for them because he said only he knew who was involved, and only he knew what the facts were. he could take anyone and everyone down with him.

''He intended to take Jerry Whitworth down with him.''

When she was asked by defense attorney Tony Tamburello why Walker singled out Whitworth, Robinson recalled that Walker told her that Whitworth ''was running his mouth too much.''

It was not clear from the testimoney when the conversation occurred.

Prosecutors did not attempt to refute Robinson's statements Tuesday, except to elicit testimony from her that she took the witness stand only after she was granted immunity from prosecution by U.S. District Judge John P. Vukasin.

Robinson had been a suspect in the case, but the investigation of her is inactive, authorities said.

Defense attorneys also sought to show that Whitworth never would have knowingly helped the Soviet Union by providing the top secret Navy code information the retired communications specialist is accused of selling the Soviet between 1975 and 1984.

Defense attorneys Tamburello and James Larson contend that while Whitworth may have passed documents to Walker, he believed Walker sold them to allied nations or private intelligence organizations.

Whitworth stopped helping Walker once he realized Walker was dealing with the Soviets, his attorneys argue.

Defense attorneys hope the jurors will acquit Whitworth of espionage if they believe that Whitworth did not know he was dealing with the Soviets.

The indictment aginst Whitworth specifically acceses him of selling U.S. secrets to the Soviet Union.

Whitworth faces life if he is convicted. The tax charges stem from his failure to report $332,000 he allegedly made by selling naval secrets to Walker.