John A. Walker Jr., a former Navy officer who in 1986 pleaded guilty to recruiting his son, a brother and a friend into a spy ring that stole military documents and sold the information to Soviet agents, died on Thursday (8/28) at the federal prison complex in Butner, N.C. He was 77.

His death, at the prison medical center, was confirmed by Chris Burke, a spokesman for the Bureau of Prisons.

Mr. Walker was a Navy communications specialist when he began spying for the Soviets at the height of the Cold War in 1967. After his arrest in May 1985, the government said he had led one of the most damaging spy operations in American history. All four members of it were convicted.

Mr. Walker worked alone initially and by most accounts without an ideological motive. Stationed in Norfolk, Va., and struggling financially, he first sold the Soviets information that allowed them to read encrypted messages, initiating the transaction by walking into the Soviet Embassy in Washington. By the 1970s, he had brought in Jerry A. Whitworth, a Navy radioman who was a close friend. Mr. Whitworth passed Mr. Walker classified Navy cryptographic data that American officials said the Soviets were particularly eager to receive.

John A. Walker Jr. is escorted into the Montgomery County Detention Center in Rockville, Md., after a pretrial hearing in Baltimore in 1985.

In 1980, when Mr. Walker learned that his older brother’s car radio business was failing, he encouraged him to find a job with a Navy contractor to gain access to documents. The brother, Arthur, did just that.

John Walker persuaded his son, Michael, a clerk with a fighter squadron in Virginia Beach and later on the aircraft carrier Nimitz, to smuggle secret documents under his jacket, including some Michael had saved from shredding.

“My father was pleased and said it looked like we were on a roll,” Michael Walker said in court. “He told me to go ahead, keep it up.”

How much each man was paid was not always clear, but Mr. Whitworth admitted in court to receiving $332,000.

Among the information the men provided were descriptions of changes made to American submarines that helped the Soviets make improvements to their own submarines. Some of the encrypted information allowed the Soviets to track American submarine and ship movements.

In the late 1970s, Mr. Walker retired from the Navy and became a private investigator. He often wore disguises and traveled the world collecting secret information and forwarding it to his buyers.

In August 1977, he traveled to Hong Kong to meet Mr. Whitworth, who was in port as a sailor on the aircraft carrier Constellation. Days later, Mr. Walker met with Soviet agents. Intelligence sources said at the time that the speed of the apparent exchanges suggested the Soviets regarded the information as highly valuable and timely.

“They were not doing that just to get something to research,” an intelligence source who requested anonymity told The New York Times in 1985. “They’re getting it because they want to use it immediately. They were clearly trying to mount a major effort to read United States communications. There’s no other reason to try to get that kind of access.”

John Anthony Walker Jr. was born on July 28, 1937, in Washington, the second of three sons. His father, John Sr., was a publicist for Warner Bros. who drank heavily. When the father’s career began failing, the Walkers moved to his hometown, Scranton, Pa. But John Sr. eventually left his wife and family, and John Jr. dropped out of his Catholic high school to enlist in the Navy. His family said he had joined after turning himself in for trying to burglarize a business.

As part of his plea deal in the spy case, Mr. Walker agreed to cooperate with investigators, in part to get his son a more lenient sentence. Michael Walker was sentenced to 25 years and released in 2000. John and Arthur Walker were given life sentences, and Mr. Whitworth was sentenced to 365 years.

Arthur Walker died in July in the same prison medical center where John Walker died. Complete information on John Walker’s survivors was not immediately available.

John and Arthur’s spy activities were reported to the authorities by John Walker’s former wife, Barbara Crowley, who said later that she had not realized that her son had also been involved. She and Mr. Walker divorced in the 1970s.

In 2008, Mr. Walker published “My Life As a Spy: One of America’s Most Notorious Spies Finally Tells His Story,” in which he attributed his actions in part to his belief that the Cold War was “a farce” and that his sharing the information would cause no harm. He did ask that his family and “the nation” forgive him for “the danger I would have caused if actual war had developed between the United States and the Soviet Union.”