David Greenglass – who served 10 years in prison for his role in the most explosive atomic spying case of the Cold War, and gave testimony that sent his sister Ethel Rosenberg and her husband to the electric chair – has died aged 92.

Greenglass, who admitted decades after the trial that he lied in court about his own sister, died in New York City on 1 July, according to the Rosenbergs’ sons, Michael and Robert Meeropol.

Julius and Ethel Rosenberg were convicted in 1951 of conspiring to steal secrets about the atomic bomb for the Soviet Union and were executed in 1953 at New York’s Sing Sing prison. They had insisted to the end that they were innocent.

After his release from prison in 1960 Greenglass lived under an assumed name in the New York borough of Queens, hoping to be forgotten for his part in a McCarthy-era case that is still furiously debated to this day.

A spokeswoman for the Meeropols, Amber Black, said on Tuesday that the brothers had been aware of their uncle’s death last summer but did not seek media attention and received no enquiries at the time.

Greenglass, indicted as a co-conspirator, testified for the government that he had given the Rosenbergs research data obtained through his wartime job as an army machinist at Los Alamos, New Mexico, the headquarters of the top-secret Manhattan project to build the atomic bomb.

He told of seeing his older sister transcribing the information on a portable typewriter at the Rosenbergs’ New York apartment in 1945. That testimony proved crucial in convicting Ethel along with her husband.

Facebook Twitter Pinterest Julius and Ethel Rosenberg leaving federal court after being indicted on charges of espionage. Photograph: Bettmann/Corbis

In 2001, in revelations more boastful than contrite, Greenglass was quoted in the book The Brother by New York Times reporter Sam Roberts as saying he had not actually seen Ethel typing and knew of it only from his wife, Ruth. For the prosecution, however, the typewriter “was as good as a smoking gun in Ethel Rosenberg’s hands”, Roberts wrote.

“Without that testimony I believe she would not have been convicted, let alone executed,” Roberts said in an interview on Tuesday.

In the book and a CBS interview Greenglass shrugged off any notion of a betrayal. He said he lied to assure leniency for himself and keep his wife out of prison so she could care for their two children.

“As a spy who turned his family in … I don’t care. I sleep well,” Greenglass said in the interview, adding that “stupidity” had kept the Rosenbergs from possibly saving themselves by admitting guilt.

Greenglass said that while history might blame him for the Rosenbergs’ deaths he hadn’t known that would be their fate — and that in any case his own family came first. He said he had been urged to lie by prosecutors, among them Roy Cohn, later a key aide to anti-communism crusader Joseph McCarthy.

To some he came to be seen as a symbol of betrayal. In the 1989 Woody Allen movie Crimes and Misdemeanors, Allen’s character says of his smug and annoying brother-in-law: “I love him like a brother — David Greenglass.”

In a statement on Tuesday the Rosenbergs’ sons said that David and Ruth Greenglass were the ones who passed atomic secrets on to the Soviets, then “pinned what they did on our parents — a calculated ploy to save themselves by fingering our parents as the scapegoats the government demanded”.

The Rosenberg sons cited a 2001 interview in which Greenglass said he expected to be remembered “as a spy who turned his family in”.

“He was right,” the sons said.

Facebook Twitter Pinterest One of the Rosenbergs’ sons, Robert, at age 12. In later life as Robert Meeropol he wrote a memoir, An Execution in the Family. Photograph: AP

Greenglass was born in New York in 1922. After army service in the second world war, including the Los Alamos assignment, he and Julius Rosenberg became partners in a machine shop. The business failed; a Rosenberg attorney later claimed that led Greenglass to seek revenge on his brother-in-law.

In fact David and Ruth Greenglass, like the Rosenbergs, were active communist sympathisers, having joined the Young Communist League in 1943. Both couples believed that the Soviet Union should have the bomb if the United States did.

At trial the Greenglasses said Julius Rosenberg had recruited David Greenglass as a spy and arranged for him to feed stolen atomic research and a detonator to a go-between, Harry Gold. Gold also was later convicted.

Greenglass served 10 years of a 15-year sentence for espionage. After his release he lived with his family in anonymity as controversy over the Rosenberg case rose and ebbed over the decades.

Greenglass remained estranged for the rest of his life from the Rosenbergs’ sons, who were six and 10 when their parents were executed. The brothers later took their adoptive parents’ surname, Meeropol.

According to Roberts, Greenglass said of his nephews: “Their whole life has been involved with this kind of stupidity – to actually think they [the Rosenbergs] were innocent.”