An Upper Marlboro woman who is awaiting murder trials was sentenced yesterday to 40 years in federal prison for mail and wire fraud related to the shooting deaths of her two husbands, in 1974 and 1990, and a boyfriend in 1996.

Josephine V. Gray, 56, became a murder suspect in Montgomery County nearly three decades ago, after her first husband was killed in 1974. In January, she was charged with murder in that slaying and in the 1990 fatal shooting of her second husband, also in Montgomery. She has yet to go on trial.

Gray, a former day-care provider who relatives said practiced voodoo, is also suspected of being involved in the death of her boyfriend in Baltimore in 1996. She has not been charged in that case.

In U.S. District Court in Greenbelt yesterday, as Gray stood for sentencing before Judge Deborah K. Chasanow, the focus was on nearly $70,000 in life insurance that Gray collected after the first two deaths and $100,000 she attempted to collect after the third, according to federal authorities.

In August, a federal jury convicted Gray of eight counts, including wire and mail fraud, stemming from the insurance payments, and yesterday Chasanow imposed the maximum sentence.

In proving that Gray committed fraud in collecting or trying to collect the insurance money, the U.S. attorney's office said, "The evidence introduced at the trial showed that [Gray] was involved" in all three deaths.

Gray's attorney, Daniel W. Stiller, a federal public defender, told Chasanow that his client "maintains her innocence and gives her faith in God as a higher power who knows she has committed no offense or done anything wrong." He asked the judge for leniency, saying that a maximum sentence would "nearly ensure that Miss Gray will never breathe another free breath," because there is no parole in the federal system.

Chasanow was unmoved. Each of the eight counts in the federal indictment was punishable by up to five years in prison, and the judge imposed the maximum sentence for each charge. She noted that prosecutors, in proving the fraud charges, had shown that Gray was responsible for "intentionally causing" the deaths.

Gray did not speak during yesterday's proceeding and did not visibly react to the sentence.

During the trial, prosecutors presented evidence that Gray arranged or committed the three fatal shootings.

Her first husband, Norman Stribbling, was shot to death in March 1974 as he sat in a car near Poolesville. Her second husband, William Gray, was fatally shot in his Germantown apartment in November 1990. Her boyfriend, Clarence Goode, was found shot to death in a car trunk in Baltimore in June 1996.

During the trial, a sister of Josephine Gray testified that Gray offered her money in exchange for an alibi for the night of Stribbling's slaying. The jury also concluded that she had been involved in Goode's slaying.

In Montgomery, Deputy State's Attorney Katherine Winfree said yesterday that her office will reassess whether to try Gray for murder, considering that the federal sentence will keep her behind bars for 40 years. Winfree said officials will decide after consulting with police and relatives of the victims.

Frances Gray, an ex-wife of William Gray, was present at yesterday's sentencing. "It's been a long time coming," she said. "Justice was finally served."

A sister testified that Josephine V. Gray tried to pay her in exchange for an alibi for the night that one of her husbands died.